template <typename Pipe = ml::Identity>
struct Divide {
template <typename T, typename U>
using f = /* .... */;
};
Divide<Pipe>
is a metafunction that passes to Pipe
an ml::Int
<value>
, where value is the division of ::value
s of underlying types. Pipe
defaults to ml::Identity
.
f:: T, U -> ml::Int<value> -> ResultOf(Pipe)
Types T
and U
need an ::value
alias, like ml::Value<Type, value>
.
using T0 = ml::f<
ml::Divide<>,
ml::Int<6>, ml::Int<3>>;
static_assert(
std::is_same_v<T0, ml::Int<2>);