cmoon::meta::value_list<Values...>::any_of
|
(1) |
Checks every value against the given predicate.
Parameters
func | - | The predicate |
Return value
true
if std::invoke(func, Values)
is true for any value in Values...
, false
otherwise.
Exceptions
1) noexcept specification:
noexcept(std::conjunction_v<std::is_nothrow_invocable<F, decltype(Values)>...>)
Example
import <concepts>;
import cmoon.meta;
struct
{
template<std::integral T>
constexpr bool operator()(T t) const noexcept
{
return t % 2 == 0;
}
} is_even {};
int main()
{
using vl = cmoon::meta::value_list<2, 3, 3>;
static_assert(vl::any_of(is_even));
}