BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
Defines a template for manipulating and storing compile-time lists of types. More...
#include <type_traits>
#include <functional>
Go to the source code of this file.
Namespaces | |
fc | |
fc::typelist | |
This namespace contains the list type, and all of the operations and queries which can be performed upon it. | |
fc::typelist::impl | |
fc::typelist::runtime | |
This namespace contains some utilities that provide runtime operations on typelists. | |
Typedefs | |
template<typename List , template< typename... > class Delegate> | |
using | fc::typelist::apply = typename impl::apply< List, Delegate >::type |
Apply a list of types as arguments to another template. More... | |
template<typename... Lists> | |
using | fc::typelist::concat = typename impl::concat< Lists... >::type |
Concatenate two or more typelists together. More... | |
template<std::size_t count> | |
using | fc::typelist::make_sequence = typename impl::make_sequence< count >::type |
Create a list of sequential integers ranging from [0, count) More... | |
template<typename List , typename Transformer > | |
using | fc::typelist::transform = typename impl::transform< List, Transformer >::type |
Transform elements of a typelist. More... | |
template<typename... TypeLists> | |
using | fc::typelist::concat_unique = typename impl::concat_unique< list<>, TypeLists... >::type |
Remove duplicate items from one or more typelists and concatenate them all together. More... | |
template<typename List , std::size_t index> | |
using | fc::typelist::at = typename impl::at< List, index >::type |
Get the type at the specified list index. More... | |
template<typename List > | |
using | fc::typelist::first = at< List, 0 > |
Get the type at the beginning of the list. More... | |
template<typename List > | |
using | fc::typelist::last = at< List, length< List >() -1 > |
Get the type at the end of the list. More... | |
template<typename List , std::size_t index> | |
using | fc::typelist::remove_at = typename impl::remove_at< list<>, List, index >::type |
Get the list with the element at the given index removed. More... | |
template<typename List , typename Remove > | |
using | fc::typelist::remove_element = remove_at< List, index_of< List, Remove >()> |
Get the list with the given type removed. More... | |
template<typename List , template< typename > class Filter> | |
using | fc::typelist::filter = typename impl::filter< Filter, list<>, List >::type |
Get a list with all elements that do not pass a filter removed. More... | |
template<typename List , std::size_t start, std::size_t end = length<List>()> | |
using | fc::typelist::slice = typename impl::slice< list<>, List, start, end >::type |
Take the sublist at indexes [start, end) More... | |
template<typename ListA , typename ListB > | |
using | fc::typelist::zip = typename impl::zip< ListA, ListB >::type |
Zip two equal-length typelists together, i.e. zip<list<X, Y>, list<A, B>> == list<list<X, A>, list<Y, B>> More... | |
template<typename List > | |
using | fc::typelist::index = typename impl::zip< typename impl::make_sequence< length< List >()>::type, List >::type |
Functions | |
template<typename Callable , typename Ret , typename T > | |
Ret | fc::typelist::impl::dispatch_helper (Callable &c) |
template<typename... Types, typename Callable , typename = std::enable_if_t<impl::length<Types...>::value != 0>, typename Return = decltype(std::declval<Callable>()(wrapper<at<list<Types...>, 0>>()))> | |
Return | fc::typelist::runtime::dispatch (list< Types... >, std::size_t index, Callable c) |
Index into the typelist for a type T, and invoke the callable with an argument wrapper<T>() More... | |
template<typename List , typename Callable > | |
auto | fc::typelist::runtime::dispatch (List l, int64_t index, Callable c) |
template<typename... Types, typename Callable > | |
void | fc::typelist::runtime::for_each (list< Types... >, Callable c) |
Invoke the provided callable with an argument wrapper<Type>() for each type in the list. More... | |
Defines a template for manipulating and storing compile-time lists of types.
Definition in file typelist.hpp.