forked from boostorg/algorithm
Add range-based overloads of find*_backward().
This commit is contained in:
@ -42,26 +42,38 @@ that the member requires.
|
||||
template<typename BidiIter, typename T>
|
||||
BidiIter find_backward(BidiIter first, BidiIter last, T const & x);
|
||||
|
||||
The function `find_backward` returns an iterator to the last element of
|
||||
`[first, last)` that is equal to `x`.
|
||||
template<typename Range, typename T>
|
||||
boost::range_iterator<Range> find_backward(Range & range, T const & x);
|
||||
|
||||
The function `find_backward` returns an iterator to the last element that is
|
||||
equal to `x` in `[first, last)` or `r`, respectively.
|
||||
|
||||
template<typename BidiIter, typename T>
|
||||
BidiIter find_not_backward(BidiIter first, BidiIter last, T const & x);
|
||||
|
||||
The function `find_not_backward` returns an iterator to the last element of
|
||||
`[first, last)` that is not equal to `x`.
|
||||
template<typename Range, typename T>
|
||||
boost::range_iterator<Range> find_not_backward(Range & range, T const & x);
|
||||
|
||||
The function `find_not_backward` returns an iterator to the last element that
|
||||
is not equal to `x` in `[first, last)` or `r`, respectively.
|
||||
|
||||
template<typename BidiIter, typename Pred>
|
||||
BidiIter find_if_backward(BidiIter first, BidiIter last, Pred p);
|
||||
|
||||
The function `find_if_backward` returns an iterator to the last element of
|
||||
`[first, last)` for which `pred` returns `true`.
|
||||
template<typename Range, typename Pred>
|
||||
boost::range_iterator<Range> find_if_backward(Range & range, Pred p);
|
||||
|
||||
The function `find_if_backward` returns an iterator to the last element for
|
||||
which `pred` returns `true` in `[first, last)` or `r`, respectively.
|
||||
|
||||
template<typename BidiIter, typename Pred>
|
||||
BidiIter find_if_not_backward(BidiIter first, BidiIter last, Pred p);
|
||||
|
||||
The function `find_if_not_backward` returns an iterator to the last element of
|
||||
`[first, last)` for which `pred` returns `false`.
|
||||
template<typename Range, typename Pred>
|
||||
boost::range_iterator<Range> find_if_not_backward(Range & range, Pred p);
|
||||
|
||||
The function `find_if_not_backward` returns an iterator to the last element
|
||||
for which `pred` returns `false` in `[first, last)` or `r`, respectively.
|
||||
|
||||
[heading Examples]
|
||||
|
||||
@ -90,6 +102,10 @@ All of the variants take their parameters by value and do not depend upon any
|
||||
global state. Therefore, all the routines in this file provide the strong
|
||||
exception guarantee.
|
||||
|
||||
[heading Notes]
|
||||
|
||||
All variants are `constexpr` in C++14 or later.
|
||||
|
||||
[endsect]
|
||||
|
||||
[/ File equal.qbk
|
||||
|
@ -43,10 +43,10 @@ our find condition.
|
||||
InputIter find_not(InputIter first, Sentinel last, T const & x);
|
||||
|
||||
template<typename Range, typename T>
|
||||
typename boost::range_iterator<Range>::type find_not(Range & r, T const & x);
|
||||
boost::range_iterator<Range> find_not(Range & r, T const & x);
|
||||
|
||||
The function `find_not` returns the first value in the sequence `[first,
|
||||
last)` that is not equal to `x`.
|
||||
The function `find_not` returns the first value that is not equal to `x` in
|
||||
the sequence `[first, last)` or `r`, respectively.
|
||||
|
||||
[heading Examples]
|
||||
|
||||
@ -72,6 +72,10 @@ Linear.
|
||||
`find_not` takes its parameters by value and do not depend upon any global
|
||||
state. Therefore, it provides the strong exception guarantee.
|
||||
|
||||
[heading Notes]
|
||||
|
||||
`constexpr` in C++14 or later.
|
||||
|
||||
[endsect]
|
||||
|
||||
[/ File equal.qbk
|
||||
|
Reference in New Issue
Block a user