List Construction¶
The following type functions are used to construct or modify type lists.
-
template<class ...L>
using core::mp::cat_t = typename cat<L...>::type¶ Concatenate the given type lists L.
cat_t<list<int>,list<char>> // list<int,char>
- Template Parameters:
L – The type lists.
-
template<typename T, size_t N>
using core::mp::generate_t = typename generate<T, N>::type¶ Generate a type list of type T repeated N times.
generate_t<int,3> // list<int,int,int>
- Template Parameters:
T – The type to duplicate.
N – The number of copies.
-
template<typename ...Ts>
using core::mp::list_t = list<Ts...>¶ Create a type list of the types Ts.
- Template Parameters:
Ts – The types to put in the type list.
-
template<typename T, typename L>
using core::mp::push_front_t = typename push_front<T, L>::type¶ Prefix type T to the type list L.
push_front_t<int,list<char>> // list<int,char>
- Template Parameters:
T – The type to add to the front of the type list.
L – The type list.
-
template<class L, template<class...> class N>
using core::mp::rename_t = typename rename<L, N>::type¶ Rename the type list L with the variadic template name N.
rename_t<list<int,char>,std::tuple> // std::tuple<int,char>
- Template Parameters:
L – The type list to rename.
N – The new variadic template name.