BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
This namespace contains some utilities that provide runtime operations on typelists. More...
Classes | |
struct | wrapper |
Type wrapper object allowing arbitrary types to be passed to functions as information rather than data. More... | |
Functions | |
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 | 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 | dispatch (List l, int64_t index, Callable c) |
template<typename... Types, typename Callable > | |
void | for_each (list< Types... >, Callable c) |
Invoke the provided callable with an argument wrapper<Type>() for each type in the list. More... | |
This namespace contains some utilities that provide runtime operations on typelists.
auto fc::typelist::runtime::dispatch | ( | List | l, |
int64_t | index, | ||
Callable | c | ||
) |
Definition at line 250 of file typelist.hpp.
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>()
index | Index of the type in the typelist to invoke the callable with |
c | The callable to invoke |
If index is out of bounds, throws std::out_of_range exception
Definition at line 243 of file typelist.hpp.
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.
Definition at line 257 of file typelist.hpp.