Created on 2017-05-26.00:00:00 last changed 89 months ago
Proposed resolution:
This wording is relative to N4659.
Edit [alg.equal] as indicated:
[Drafting note: The current wording presented below uses two times the unusual phrase "[…] return […]" instead of "[…] returns […]". The project editor is kindly asked to consider to replace these unusual wording forms by the usual one. — end drafting note]
template<class InputIterator1, class InputIterator2> bool equal(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2); […]-1- Remarks: If last2 was not given in the argument list, it denotes first2 + (last1 - first1) below.
-2- Returns: If [first1, last1) and [first2, last2) are both empty, returns true. If last1 - first1 != last2 - first2, return false. Otherwise return true if for every iterator i in the range [first1, last1) the following corresponding conditions hold: *i == *(first2 + (i - first1)), pred(*i, *(first2 + (i - first1))) != false. Otherwise, returns false. […]
[ 2017-07 Toronto Monday issue prioritization ]
Closing as NAD; the existing wording covers empty sequences
The description of the std::equal() algorithm in the standard doesn't make clear what the result of it is on empty ranges:
std::equal(first, first, second) ; // what does this return?
It should IMHO return true (two empty ranges are always equal).
History | |||
---|---|---|---|
Date | User | Action | Args |
2017-07-12 01:30:31 | admin | set | messages: + msg9334 |
2017-07-12 01:30:31 | admin | set | status: new -> nad |
2017-05-27 09:23:31 | admin | set | messages: + msg9191 |
2017-05-26 00:00:00 | admin | create |