PR libstdc++/80229 restore support for shared_ptr<function type>
commitadc10b0c963f1273f9309303338cfe7481f53a45
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Mar 2017 07:35:04 +0000 (28 07:35 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Mar 2017 07:35:04 +0000 (28 07:35 +0000)
treeb895a827025bb58d8a80a76e86e6218d070d7cb8
parent71c4c7b331f558645852dfebfda8c5e7e8f21b42
PR libstdc++/80229 restore support for shared_ptr<function type>

PR libstdc++/80229
* include/bits/shared_ptr_base.h
(__shared_ptr::_M_enable_shared_from_this_with): Change parameters to
non-const and then use remove_cv to get unqualified type.
* testsuite/20_util/enable_shared_from_this/members/const.cc: Don't
cast away constness on object created const.
* testsuite/20_util/shared_ptr/cons/80229.cc: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@246520 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/shared_ptr_base.h
libstdc++-v3/testsuite/20_util/enable_shared_from_this/members/const.cc
libstdc++-v3/testsuite/20_util/shared_ptr/cons/80229.cc [new file with mode: 0644]