Struct __contains_fn#
Defined in File Backports.h
Struct Documentation#
-
struct __contains_fn#
Public Functions
-
template<std::input_iterator I, std::sentinel_for<I> S, typename T, typename Proj = std::identity>
inline constexpr bool operator()(I first, S last, const T &value, Proj proj = {}) const# Search-based algorithm that checks whether or not a given range contains a value with iterator-sentinel pairs.
- Parameters:
first – The range of elements to examine.
last – The range of elements to examine.
value – Value to compare the elements to.
proj – Projection to apply to the elements.
- Returns:
std::ranges::find(std::move(first), last, value, proj) != last.
-
template<ranges::input_range R, typename T, typename Proj = std::identity>
inline constexpr bool operator()(R &&r, const T &value, Proj proj = {}) const# Search-based algorithm that checks whether or not a given range contains a value with iterator-sentinel pairs.
- Parameters:
r – The range of the elements to examine.
value – Value to compare the elements to.
proj – Projection to apply to the elements.
- Returns:
std::ranges::find(std::move(first), last, value, proj) != last.
-
template<std::input_iterator I, std::sentinel_for<I> S, typename T, typename Proj = std::identity>