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++/86537] std::less specialization for std::shared_ptr


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |redi at gcc dot gnu.org

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I added the partial specialization in r141512 to meet the updated requirements
in https://wg21.link/n2637 in particular:

    For templates greater, less, greater_equal, and less_equal,
    the partial specializations for shared_ptr yield a total order,
    even if the built-in operators <, >, <=, >= do not.  Moreover,
    less<shared_ptr<T> >::operator()(a, b) shall return
    std::less<T*>::operator()(a.get(), b.get()).

However, https://wg21.link/lwg1262 replaced that wording and removed the need
for a partial specialization of std::less. Despite filing that issue myself I
apparently never fixed GCC.

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