13#ifndef RANGES_V3_ALGORITHM_FIND_HPP
14#define RANGES_V3_ALGORITHM_FIND_HPP
28#include <range/v3/utility/static_const.hpp>
30#include <range/v3/detail/prologue.hpp>
36 RANGES_FUNC_BEGIN(find)
46 template(
typename I,
typename S,
typename V,
typename P =
identity)(
49 constexpr I RANGES_FUNC(find)(I
first, S last, V
const & val, P proj = P{})
52 if(
invoke(proj, *first) == val)
58 template(
typename Rng,
typename V,
typename P =
identity)(
61 constexpr borrowed_iterator_t<Rng>
62 RANGES_FUNC(find)(Rng && rng, V
const & val, P proj = P{})
64 return (*
this)(begin(rng), end(rng), val, std::move(proj));
76#include <range/v3/detail/epilogue.hpp>
The indirect_relation concept.
The sentinel_for concept.
decltype(begin(declval(Rng &))) iterator_t
Definition access.hpp:698
typename Fn::template invoke< Args... > invoke
Evaluate the invocable Fn with the arguments Args.
Definition meta.hpp:541
front< Pair > first
Retrieve the first element of the pair Pair.
Definition meta.hpp:2251
Definition adjacent_find.hpp:67
Definition comparisons.hpp:28
Definition identity.hpp:25