This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/86537] std::less specialization for std::shared_ptr
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 16 Jul 2018 16:15:47 +0000
- Subject: [Bug libstdc++/86537] std::less specialization for std::shared_ptr
- Auto-submitted: auto-generated
- References: <bug-86537-4@http.gcc.gnu.org/bugzilla/>
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.