Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 715 Bytes

ToValue.md

File metadata and controls

31 lines (24 loc) · 715 Bytes

<CppML/Functional/ToValue.hpp>

ToValue

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

ToValue

ToValue is a metafunction that returns the parameter pack Ts::value... wrapped in a list; ml::ListA<Ts::value...>.

f:: Ts... -> ml::ListA<Ts::value...>

NOTE that ToValue is only enabled for C++17+(more precisely, for those versions defining the __cpp_nontype_template_parameter_auto macro).

Example

using T = ml::f<
                ml::ToValue,
                ml::Int<0>, ml::Int<1>>;
static_assert(
        std::is_same_v<
                T,
                ml::ListA< 0, 1>>);