Created on 2015-04-14.00:00:00 last changed 90 months ago
Proposed resolution:
This wording is relative to N4431.
Change [alg.sorting]/3 to the following:
For all algorithms that take Compare, there is a version that uses operator< instead. That is, comp(*i, *j) != false defaults to *i < *j != false. For algorithms other than those described in 25.4.3
to work correctly, comp shallhas toinduce a strict weak ordering on the values.
[ 2015-05, Lenexa ]
Move to Immediate.
N4296 [alg.sorting]/3 reads:
For all algorithms that take Compare, there is a version that uses operator< instead. That is, comp(*i,*j) != false defaults to *i < *j != false. For algorithms other than those described in 25.4.3 to work correctly, comp has to induce a strict weak ordering on the values.
So it's not specified clearly what happens if comp or operator< don't induce a strict weak ordering. Is it undefined or implementation-defined behavior? It seems that it should be stated more clearly that the behavior is undefined.
History | |||
---|---|---|---|
Date | User | Action | Args |
2017-07-30 20:15:43 | admin | set | status: wp -> c++17 |
2015-10-27 16:52:45 | admin | set | status: ready -> wp |
2015-05-20 14:24:57 | admin | set | status: immediate -> ready |
2015-05-07 19:30:46 | admin | set | messages: + msg7372 |
2015-05-07 19:30:46 | admin | set | status: new -> immediate |
2015-04-14 18:04:09 | admin | set | messages: + msg7343 |
2015-04-14 00:00:00 | admin | create |