This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/80229] [7 Regression] shared_ptr<T> gives an error when is_function<T> is true


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80229

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Tue Mar 28 07:35:04 2017
New Revision: 246520

URL: https://gcc.gnu.org/viewcvs?rev=246520&root=gcc&view=rev
Log:
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.

Added:
    trunk/libstdc++-v3/testsuite/20_util/shared_ptr/cons/80229.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/bits/shared_ptr_base.h
   
trunk/libstdc++-v3/testsuite/20_util/enable_shared_from_this/members/const.cc

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]