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 c++/47706] std::min/max and NaN


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47706

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-02-12 01:54:53 UTC ---
Never mind the second half of my comment, the issue has nothing to do with
irreflexivity of course.

The point is, in the implementation of std::min the comparison fails and the
first argument is returned, because the standard wants the first argument if
the arguments are equivalent. Given the latter requirement + only
LessThanComparable is required, I don't see how the behavior could be
different.


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