Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 538 Bytes

PackExtractor.md

File metadata and controls

30 lines (22 loc) · 538 Bytes

<CppML/Pack/PackExtractor.hpp>

PackExtractor

template <typename ...Ts>
struct PackExtractor {
  template <typename I>
  using f = /* .... */;
};

PackExtractor<Ts...>

PackExtractor<Ts...> is a metafunction that returns U, which is the I::value-th element of the parameter pack Ts....

f::  I -> U 

Example

using Extractor = ml::PackExtractor<int, char, bool>;

using T = ml::f<
               Extractor,
               ml::Int<1>>;

static_assert( std::is_same_v<T, char>);