cmoon::meta::value_list<Values...>::all_of
|
(1) |
Checks every value against the given predicate.
Parameters
func | - | The predicate |
Return value
true
if std::invoke(func, Values)
is true for every 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, 4, 6>;
static_assert(vl::all_of(is_even));
}