Luna::any_of
template <typename _InputIt, typename _UnaryPredicate>
constexpr bool any_of(_InputIt first, _InputIt last, _UnaryPredicate p)
Checks if the unary predicate returns true
for at least one element in the range.
Parameters
-
in first
The iterator to the first element of the range.
-
in last
The iterator to the one-past-last element of the range.
-
in p
The user-provided unary predicate which will be called to test elements.
Return value
Returns ture
if the unary predicate returns true
for at least one element in the range. Returns false
otherwise.
Valid Usage
- The expression
p(v)
must be convertible tobool
for every argumentv
of typeVT
, whereVT
is the value type of_InputIt
, and must not modifyv
.