Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 760 Bytes

ToList.md

File metadata and controls

32 lines (25 loc) · 760 Bytes

<CppML/Functional/ToList.hpp>

ToList

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

ToList

ToList is a metafunction that returns the parameter pack Ts... wrapped in a list; ml::ListT<Ts...>.

f:: Ts... -> ml::ListT<Ts...>

ml::ListT is used as the default Pipe for all metafunctions that forward a parameter pack. Remember that a parameter pack is not a type, and can therefore cannot be what a metafunction returns.

Example

using T = ml::f<
                ml::ToList,
                int, char>;
static_assert(
        std::is_same_v<
                T,
                ml::ListT<
                    int, char>>);