[LLVMbugs] [Bug 19547] min_element doesn't produce the first minimum element in some cases
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Apr 25 08:51:44 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19547
Marshall Clow (home) <mclow.lists at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |INVALID
--- Comment #4 from Marshall Clow (home) <mclow.lists at gmail.com> ---
There it is: 25.4 [alg.sorting], which lists the requirements for a comparison
function.
p3: For algorithms other than those described in 25.4.3 to work correctly, comp
has to induce a strict weak ordering on the values.
Note that if you pass < (which does induce a strict weak ordering), the current
implementation of min_element returns the correct iterator.
Committed revision 207232 to add tests for this case.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140425/260546fe/attachment.html>
More information about the llvm-bugs
mailing list