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++/78420] std::less<T*> is not a total order with -O2 enabled


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++.

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