14 #ifndef RANGES_V3_ACTION_UNIQUE_HPP
15 #define RANGES_V3_ACTION_UNIQUE_HPP
27 #include <range/v3/utility/static_const.hpp>
29 #include <range/v3/detail/prologue.hpp>
39 template(
typename C,
typename P =
identity)(
41 constexpr
auto operator()(C pred, P proj = P{})
const
43 return make_action_closure(
48 requires forward_range<Rng> AND
51 Rng operator()(Rng && rng, C pred = C{}, P proj = P{})
const
53 auto it = ranges::unique(rng, std::move(pred), std::move(proj));
54 ranges::erase(rng, it, end(rng));
55 return static_cast<Rng &&
>(rng);
66 #include <range/v3/detail/epilogue.hpp>
CPP_concept sortable
\concept sortable
Definition: concepts.hpp:865
decltype(begin(declval(Rng &))) iterator_t
Definition: access.hpp:698
RANGES_INLINE_VARIABLE(detail::to_container_fn< detail::from_range< std::vector >>, to_vector) template< template< typename... > class ContT > auto to(RANGES_HIDDEN_DETAIL(detail
For initializing a container of the specified type with the elements of an Range.
Definition: conversion.hpp:399
CPP_concept erasable_range
\concept erasable_range
Definition: erase.hpp:76
defer< bind_back, Fn, Ts... > bind_back
Definition: meta.hpp:994
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: action.hpp:141
Definition: unique.hpp:38
Definition: identity.hpp:25