[Bug libstdc++/78420] std::less<T*> is not a total order with -O2 enabled
jason at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Nov 18 21:53:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78420
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |libstdc++
--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Tomasz Kamiński from comment #7)
> Notice that I am concerned about !std::less<T*>{}(a,b) &&
> !std::less<T*>(b,a) being false, when std::less<T*>{}(a,b) and
> std::less<T*>{}(b,a) are both false, and in contrast to raw operator<,
> std::less is required to provide total order, which is no longer the case.
>
> And my complain, is about behavior of std::less<T*>, that is not standard
> compliant. If it can be changed without changing <, I am fine with it.
Yes, I think the way forward here is to work around this in libstdc++.
More information about the Gcc-bugs
mailing list