13#ifndef RANGES_V3_ALGORITHM_ENDS_WITH_HPP
14#define RANGES_V3_ALGORITHM_ENDS_WITH_HPP
21#include <range/v3/detail/config.hpp>
29#include <range/v3/detail/prologue.hpp>
35 RANGES_FUNC_BEGIN(ends_with)
50 constexpr
bool RANGES_FUNC(ends_with)(I0 begin0,
58 const auto drop = distance(begin0, end0) - distance(begin1, end1);
61 return equal(next(std::move(begin0),
drop),
71 template(
typename Rng0,
79 constexpr bool RANGES_FUNC(ends_with)(
80 Rng0 && rng0, Rng1 && rng1, C pred = C{}, P0 proj0 = P0{}, P1 proj1 = P1{})
82 const auto drop = distance(rng0) - distance(rng1);
85 return equal(next(begin(rng0),
drop),
94 RANGES_FUNC_END(ends_with)
98#include <range/v3/detail/epilogue.hpp>
The forward_iterator concept.
The forward_range concept.
The indirectly_comparable concept.
The sentinel_for concept.
The sized_sentinel_for concept.
template(typename Rng0, typename Rng1, typename C=equal_to, typename P0=identity, typename P1=identity)(AND(forward_range< Rng1 >||(input_range< Rng1 > &&sized_range< Rng1 >)) AND indirectly_comparable< iterator_t< Rng0 >
This is an overloaded member function, provided for convenience. It differs from the above function o...
decltype(begin(declval(Rng &))) iterator_t
Definition: access.hpp:698
bool_< T::type::value==U::type::value > equal_to
A Boolean integral constant wrapper around the result of comparing T::type::value and U::type::value ...
Definition: meta.hpp:237
Definition: comparisons.hpp:28
Definition: identity.hpp:25