This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/47706] std::min/max and NaN
- From: "paolo.carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 12 Feb 2011 01:55:02 +0000
- Subject: [Bug c++/47706] std::min/max and NaN
- Auto-submitted: auto-generated
- References: <bug-47706-4@http.gcc.gnu.org/bugzilla/>
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.