template <int N, typename Pipe = ml::ToList>
struct Head {
template <typename ...Ts>
using f = /* .... */;
};
Head<N, Pipe>
is a metafunction that passes to Pipe
the parameter pack T0, T1, ..., T_{N-1}
, which is generated by taking the first N
elements of the parameter pack Ts...
. Pipe
defaults to ml::ToList
.
f:: T0, T1, ..., T_{N-1}, T's... -> T0, T1, ..., T_{N-1} >-> Pipe
using AF = ml::Head<2, ml::F<std::tuple>>;
using T = ml::f<
AF,
int, char, bool, double>;
static_assert(
std::is_same_v<
T,
std::tuple<int, char>>);