Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 724 Bytes

Drop.md

File metadata and controls

32 lines (25 loc) · 724 Bytes

<CppML/Pack/Drop.hpp>

Drop

template <int N, typename Pipe = ml::ToList>
struct Drop {
  template <typename ...Ts>
  using f = /* .... */;
};

Drop<N, Pipe>

Drop<N, Pipe> is a metafunction that passes to Pipe the parameter pack Us..., which is generated by dropping first N elements of the parameter pack Ts.... Pipe defaults to ml::ToList.

f:: U0, ... U_{N-1}, Us... -> Us... >-> Pipe

Example

using AF = ml::Drop<2, ml::F<std::tuple>>;
using T = ml::f<
               AF,
               int, char, bool, double>;
static_assert(
              std::is_same_v<
                  T,
                  std::tuple<bool, double>>);