PR libstdc++/80229 restore support for shared_ptr<function type>
authorJonathan Wakely <jwakely@redhat.com>
Tue, 28 Mar 2017 07:35:04 +0000 (08:35 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 28 Mar 2017 07:35:04 +0000 (08:35 +0100)
commitb1bd91584338e543ae7f6e7be707e6a2333f0c6d
treeb895a827025bb58d8a80a76e86e6218d070d7cb8
parenta292245ee8f4735d28b6cba7a614999bc81731f2
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.

From-SVN: r246520
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]