13#ifndef RANGES_V3_ALGORITHM_CONTAINS_HPP
14#define RANGES_V3_ALGORITHM_CONTAINS_HPP
21#include <range/v3/detail/config.hpp>
28#include <range/v3/detail/prologue.hpp>
34 RANGES_FUNC_BEGIN(contains)
40 constexpr
bool RANGES_FUNC(contains)(I
first, S last, const T & val, P proj = {})
42 return find(std::move(
first), last, val, std::move(proj)) != last;
46 template(
typename Rng,
typename T,
typename P =
identity)(
49 constexpr bool RANGES_FUNC(contains)(Rng && rng,
const T & val, P proj = {})
51 return (*
this)(begin(rng), end(rng), val, std::move(proj));
54 RANGES_FUNC_END(contains)
58#include <range/v3/detail/epilogue.hpp>
The indirect_relation concept.
The sentinel_for concept.
template(typename Rng, typename T, typename P=identity)(AND indirect_relation< equal_to
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
front< Pair > first
Retrieve the first element of the pair Pair.
Definition: meta.hpp:2251
drop< L, min< find_index< L, T >, size< L > > > find
Return the tail of the list L starting at the first occurrence of T, if any such element exists; the ...
Definition: meta.hpp:2388
Definition: comparisons.hpp:28
Definition: identity.hpp:25