template <typename Predicate, typename Pipe = ml::Identity>
struct AnyOf {
template <typename ...Ts>
using f = /* .... */;
};
AnyOf<Predicate, Pipe>
is a metafunction that passes to Pipe
and ml::Bool
<truth_value>
, where truth_value marks whether the predicate holds for any element of the parameter pack Ts
. Pipe
defaults to ml::Identity
.
f:: Ts... -> ml::Bool<truth_value> >-> Pipe
Predicate must be a metafunction returning ml::Bool<truth_value>
.
f: T -> ml::Bool<truth_value>
using T0 = ml::f<
ml::AnyOf<ml::IsClass<>>,
int, char, std::string>;
static_assert(
std::is_same_v<T, ml::Bool<true>);
using T1 = ml::f<
ml::AnyOf<
ml::IsClass<>,
ml::Not<>>,
int, char, std::string>;
static_assert(
std::is_same_v<T, ml::Bool<false>);