mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
Clarify result of lower_bound
The previous formulation made it sound like the return value is always `last` if `val` is not in the range, which might lead to confusion.
This commit is contained in:
parent
4af8321e91
commit
dea3b94f12
|
@ -13160,7 +13160,7 @@ needed information back to the caller. Therefore, the standard library also offe
|
|||
template <class ForwardIterator, class T>
|
||||
ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last, const T& val);
|
||||
|
||||
`lower_bound` returns an iterator to the first match if any, otherwise `last`.
|
||||
`lower_bound` returns an iterator to the first match if any, otherwise to the first element greater than `val`, or `last` if no such element is found.
|
||||
|
||||
However, `lower_bound` still doesn't return enough information for all uses, so the standard library also offers
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user