template <typename Predicate, typename Pipe = ml::Identity>
struct AllOf {
template <typename ...Ts>
using f = /* .... */;
};
AllOf<Predicate, Pipe>
is a metafunction that passes to Pipe
an ml::Bool
<truth_value>
, where truth_value marks whether the predicate holds for all elements 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::AllOf<ml::IsClass<>>,
int, char, std::string>;
static_assert(
std::is_same_v<T, ml::Bool<false>);
using T1 = ml::f<
ml::AllOf<
ml::IsClass<>,
ml::Not<>>,
int, char, std::string>;
static_assert(
std::is_same_v<T, ml::Bool<true>);