std::ranges::ends_with
Defined in header <algorithm>
|
||
Call signature |
||
template< std::input_iterator I1, std::sentinel_for<I1> S1, std::input_iterator I2, std::sentinel_for<I2> S2, |
(1) | (since C++23) |
template< ranges::input_range R1, ranges::input_range R2, class Pred = ranges::equal_to, |
(2) | (since C++23) |
Checks whether the second range matches the suffix of the first range.
- If N1 < N2 is true, returns false.
- Otherwise, returns ranges::equal(std::move(first1) + (N1 - N2), last1,
std::move(first2), last2, pred, proj1, proj2).
- If N1 < N2 is true, returns false.
- Otherwise, returns ranges::equal(views::drop(ranges::ref_view(r1),
N1 - static_cast<decltype(N1)>(N2)),
r2, pred, proj1, proj2).
The function-like entities described on this page are algorithm function objects (informally known as niebloids), that is:
- Explicit template argument lists cannot be specified when calling any of them.
- None of them are visible to argument-dependent lookup.
- When any of them are found by normal unqualified lookup as the name to the left of the function-call operator, argument-dependent lookup is inhibited.
Contents |