Created on 2006-05-03.00:00:00 last changed 171 months ago
Proposed resolution:
Change [lib.upper.bound]:
Returns: The furthermost iterator i in the range [first, last
)] such that for any iterator j in the range [first, i) the following corresponding conditions hold: !(value < *j) or comp(value, *j) == false.
ISO/IEC 14882:2003 says:
25.3.3.2 upper_bound
Returns: The furthermost iterator i in the range [first, last) such that for any iterator j in the range [first, i) the following corresponding conditions hold: !(value < *j) or comp(value, *j) == false.
From the description above, upper_bound cannot return last, since it's not in the interval [first, last). This seems to be a typo, because if value is greater than or equal to any other values in the range, or if the range is empty, returning last seems to be the intended behaviour. The corresponding interval for lower_bound is also [first, last].
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg3104 |
2006-05-03 00:00:00 | admin | create |