Skip to content

Latest commit

 

History

History
32 lines (26 loc) · 710 Bytes

Map.md

File metadata and controls

32 lines (26 loc) · 710 Bytes

<CppML/Functional/Map.hpp>

Map

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

Map<F, Pipe>

Map<F, Pipe> is a metafunction that passes to Pipe the parameter pack Us..., which is generated by applying F to each element of Ts.... Pipe defaults to ml::ToList.

f:: Ts... -> F(Ts)... >-> Pipe

Example

using T = ml::f<
              ml::Map<
                  ml::IsClass<>>,
              int, std::string, char>;
static_assert(
      std::is_same_v<
            T,
            ml::ListT<
                ml::Bool<false>, ml::Bool<true>, ml::Bool<false>>>);