xieite ::type_list {}
Defined in fragment xieite :type_list
(header-only:
<xieite/meta/type_list.hpp>
)
A metaprogramming utility for storing and manipulating a list of types.
Definition
template <typename... Ts >struct type_list {static constexpr std ::size_t size =sizeof... (Ts );template <auto cond >static constexpr bool all =xieite ::is_satisfd_all <cond ,Ts ...>;template <auto cond >static constexpr bool any =xieite ::is_satisfd_any <cond ,Ts ...>;template <typename T ,auto comp =/* ... */ >static constexpr bool has = (... ||xieite ::is_satisfd <comp ,T ,Ts >);template <auto cond >requires (xieite ::is_satisfd_any <cond ,Ts ...>)static constexpr std ::size_t find =/* ... */ ;template <std ::size_t idx >requires (idx <sizeof... (Ts ))using at =/* ... */ ;static constexpr auto apply (auto&& )XIEITE_ARROW (/* ... */ )template <auto fn >static constexpr bool satisf =xieite ::is_satisfd <fn ,Ts ...>;template <template <typename... >typename M >using to =M <Ts ...>;template <typename Ret >using as_fn =/* ... */ ;template <typename... Us >using append =xieite ::type_list <Ts ...,Us ...>;template <typename List >using append_list =/* ... */ ;template <typename... Us >using prepend =xieite ::type_list <Us ...,Ts ...>;template <typename List >using prepend_list =/* ... */ ;using rev =/* ... */ ;template <std ::size_t start ,std ::size_t end =sizeof... (Ts )>using slice =/* ... */ ;template <std ::size_t start ,std ::size_t end =start +1 >using erase =/* ... */ ;template <std ::size_t start ,std ::size_t end ,typename... Us >using rplc =/* ... */ ;template <std ::size_t start ,std ::size_t end ,typename List >using rplc_list =/* ... */ ;template <std ::size_t idx ,typename... Us >using insert =xieite ::type_list <Ts ...>::rplc <idx ,idx ,Us ...>;template <std ::size_t idx ,typename List >using insert_list =xieite ::type_list <Ts ...>::rplc_list <idx ,idx ,List >;template <std ::size_t idx ,typename T >using set =xieite ::type_list <Ts ...>::rplc <idx ,idx +1 ,T >;template <std ::size_t idx0 ,std ::size_t idx1 >using swap =/* ... */ ;template <std ::size_t start0 ,std ::size_t end0 ,std ::size_t start1 ,std ::size_t end1 >using swap_lists =/* ... */ ;template <std ::size_t ... idxs >using arrange =xieite ::type_list <xieite ::type_list <Ts ...>::at <idxs >...>;template <auto cond >using filter =/* ... */ ;template <auto comp =/* ... */ >using dedup =/* ... */ ;template <std ::size_t n >using repeat =/* ... */ ;template <std ::size_t arity ,auto fn >requires (!(sizeof... (Ts ) %arity ))using xform =/* ... */ ;template <std ::size_t arity ,auto fn >requires (!(sizeof... (Ts ) %arity ))using xform_flat =/* ... */ ;template <typename... Us >requires (sizeof... (Ts ) ==sizeof... (Us ))using zip =/* ... */ ;template <typename List >using zip_list =/* ... */ ; };
Member type aliases
-append <>
-
append_list <>
-
arrange <>
-
as_fn <>
-
at <>
-
dedup <>
-
erase <>
-
filter <>
-
insert <>
-
insert_list <>
-
prepend <>
-
prepend_list <>
-
repeat
-
rev
-
rplc <>
-
rplc_list <>
-
set <>
-
slice <>
-
swap <>
-
swap_lists <>
-
to <>
-
xform <>
-
xform_flat <>
-
zip <>
-
zip_list <>
Static member variables
-all <>
-
any <>
-
has <>
-
find <>
-
satisf <>
-
size
Static member functions
-apply ()
Example
Possible output:import xieite ;int main () {using list =xieite ::type_list <int ,char > ::append <float ,double > ::rev ::template erase <2 >;xieite ::dump (xieite ::name <list >()); }
xieite::type_list<double, float, int>