Go to the documentation of this file.
22 #ifndef RIOT_THREAD_UTILS_HPP
23 #define RIOT_THREAD_UTILS_HPP
40 template <
long Max,
long Pos = 0,
typename Indices =
int_list<>>
46 template <
long Pos,
long... Is>
57 template <
long Max,
long Pos,
long... Is>
68 template <
long To,
long From = 0>
76 template <
class F,
long... Is,
class Tuple>
78 -> decltype(f(std::get<Is>(tup)...)) {
79 return f(std::get<Is>(tup)...);
86 template <
class F,
class Tuple,
class... Ts>
88 -> decltype(f(std::forward<Ts>(args)...)) {
89 return f(std::forward<Ts>(args)...);
96 template <
class F,
long... Is,
class Tuple,
class... Ts>
99 -> decltype(f(std::forward<Ts>(args)..., std::get<Is>(tup)...)) {
100 return f(std::forward<Ts>(args)..., std::get<Is>(tup)...);
106 template <
class F,
long... Is,
class Tuple,
class... Ts>
109 -> decltype(f(std::get<Is>(tup)..., std::forward<Ts>(args)...)) {
110 return f(std::get<Is>(tup)..., std::forward<Ts>(args)...);
116 #endif // RIOT_THREAD_UTILS_HPP
Creates indices from Pos to Max.
auto apply_args_suffxied(F &f, detail::int_list< Is... >, Tuple &tup, Ts &&... args) -> decltype(f(std::get< Is >(tup)..., std::forward< Ts >(args)...))
Suffix the tuple with additional arguments.
il_indices< To, From >::type get_indices()
Function to create a list of indices from From to To.
auto apply_args_prefixed(F &f, detail::int_list<>, Tuple &, Ts &&... args) -> decltype(f(std::forward< Ts >(args)...))
Prefix the argument tuple with additional arguments.
typename il_indices< Max, Pos+1, int_list< Is..., Pos > >::type type
Append Pos to list and increment for the next step.
auto apply_args(F &f, detail::int_list< Is... >, Tuple &&tup) -> decltype(f(std::get< Is >(tup)...))
Apply arguments in a tuple to function.
A list of integers (wraps a long...