tlx
Loading...
Searching...
No Matches
tlx::meta_detail Namespace Reference

Classes

class  CallForRangeImpl
 helper for call_for_range: general recursive case More...
 
class  CallForRangeImpl< Index, 0, Functor >
 helper for call_for_range: base case More...
 
struct  make_index_sequence_helper
 
struct  make_index_sequence_helper< 0, Indexes... >
 
class  VMapForRangeImpl
 helper for vmap_for_range: general recursive case More...
 
class  VMapForRangeImpl< Index, 0, Functor >
 helper for vmap_for_range: base case More...
 

Functions

template<typename Functor, typename Tuple, std::size_t... Is>
auto apply_tuple_impl (Functor &&f, Tuple &&t, index_sequence< Is... >)
 
template<typename Functor, typename Arg>
void call_foreach_impl (Functor &&f, Arg &&arg)
 helper for call_foreach: base case
 
template<typename Functor, typename Arg, typename... MoreArgs>
void call_foreach_impl (Functor &&f, Arg &&arg, MoreArgs &&... rest)
 helper for call_foreach: general recursive case
 
template<typename Functor, typename Tuple, std::size_t... Is>
void call_foreach_tuple_impl (Functor &&f, Tuple &&t, index_sequence< Is... >)
 helper for call_foreach_tuple
 
template<typename Functor, typename Tuple, std::size_t... Is>
void call_foreach_tuple_with_index_impl (Functor &&f, Tuple &&t, index_sequence< Is... >)
 helper for call_foreach_tuple_with_index
 
template<size_t Index, typename Functor, typename Arg>
void call_foreach_with_index_impl (Functor &&f, Arg &&arg)
 helper for call_foreach_with_index: base case
 
template<size_t Index, typename Functor, typename Arg, typename... MoreArgs>
void call_foreach_with_index_impl (Functor &&f, Arg &&arg, MoreArgs &&... rest)
 helper for call_foreach_with_index: general recursive case
 
template<typename Reduce, typename Initial, typename Arg>
auto fold_left_impl (Reduce &&r, Initial &&init, Arg &&arg)
 helper for fold_left(): base case
 
template<typename Reduce, typename Initial, typename Arg, typename... MoreArgs>
auto fold_left_impl (Reduce &&r, Initial &&init, Arg &&arg, MoreArgs &&... rest)
 helper for fold_left(): general recursive case
 
template<typename Reduce, typename Initial, typename Tuple, std::size_t... Is>
auto fold_left_tuple_impl (Reduce &&r, Initial &&init, Tuple &&t, index_sequence< Is... >)
 helper for fold_left_tuple: forwards tuple entries
 
template<typename Reduce, typename Initial, typename Arg>
auto fold_right_impl (Reduce &&r, Initial &&init, Arg &&arg)
 helper for fold_right: base case
 
template<typename Reduce, typename Initial, typename Arg, typename... MoreArgs>
auto fold_right_impl (Reduce &&r, Initial &&init, Arg &&arg, MoreArgs &&... rest)
 helper for fold_right: general recursive case
 
template<typename Reduce, typename Initial, typename Tuple, std::size_t... Is>
auto fold_right_tuple_impl (Reduce &&r, Initial &&init, Tuple &&t, index_sequence< Is... >)
 helper for fold_right_tuple: forwards tuple entries
 
static auto call_chain ()
 Base case for the chaining of functors: zero functors, returns the identity.
 
template<typename Functor>
auto call_chain (const Functor &functor)
 Base case for the chaining of functors.
 
template<typename Functor, typename... MoreFunctors>
auto call_chain (const Functor &functor, const MoreFunctors &... rest)
 Recursive case for the chaining of functors.
 
template<typename Functor>
auto call_stack (const Functor &functor)
 Base case for the chaining of functors.
 
template<typename Functor, typename... MoreFunctors>
auto call_stack (const Functor &functor, const MoreFunctors &... rest)
 Recursive case for the chaining of functors.
 
template<typename Functor, typename Arg>
auto vmap_foreach_impl (Functor &&f, Arg &&arg)
 helper for vmap_foreach: base case
 
template<typename Functor, typename Arg, typename... MoreArgs>
auto vmap_foreach_impl (Functor &&f, Arg &&arg, MoreArgs &&... rest)
 helper for vmap_foreach: general recursive case
 
template<typename Functor, typename Tuple, std::size_t... Is>
auto vmap_foreach_tuple_impl (Functor &&f, Tuple &&t, index_sequence< Is... >)
 helper for vmap_foreach_tuple: forwards tuple entries
 
template<typename Functor, typename Tuple, std::size_t... Is>
auto vmap_foreach_tuple_with_index_impl (Functor &&f, Tuple &&t, index_sequence< Is... >)
 helper for vmap_foreach_tuple_with_index: forwards tuple entries
 
template<size_t Index, typename Functor, typename Arg>
auto vmap_foreach_with_index_impl (Functor &&f, Arg &&arg)
 helper for vmap_foreach_with_index: base case
 
template<size_t Index, typename Functor, typename Arg, typename... MoreArgs>
auto vmap_foreach_with_index_impl (Functor &&f, Arg &&arg, MoreArgs &&... rest)
 helper for vmap_foreach_with_index: general recursive case
 

Function Documentation

◆ apply_tuple_impl()

template<typename Functor, typename Tuple, std::size_t... Is>
auto apply_tuple_impl ( Functor && f,
Tuple && t,
index_sequence< Is... >  )

Definition at line 31 of file apply_tuple.hpp.

◆ call_chain() [1/3]

static auto call_chain ( )
inlinestatic

Base case for the chaining of functors: zero functors, returns the identity.

Definition at line 34 of file function_chain.hpp.

◆ call_chain() [2/3]

template<typename Functor>
auto call_chain ( const Functor & functor)

Base case for the chaining of functors.

The one functor receives an input element

Parameters
functorfunctor that represents the chain end.

Definition at line 47 of file function_chain.hpp.

◆ call_chain() [3/3]

template<typename Functor, typename... MoreFunctors>
auto call_chain ( const Functor & functor,
const MoreFunctors &... rest )

Recursive case for the chaining of functors.

The first functor receives an input element, and the remaining chain is applied to the result.

Parameters
functorCurrent functor to be chained.
restRemaining functors.

Definition at line 64 of file function_chain.hpp.

◆ call_foreach_impl() [1/2]

template<typename Functor, typename Arg>
void call_foreach_impl ( Functor && f,
Arg && arg )

helper for call_foreach: base case

Definition at line 29 of file call_foreach.hpp.

◆ call_foreach_impl() [2/2]

template<typename Functor, typename Arg, typename... MoreArgs>
void call_foreach_impl ( Functor && f,
Arg && arg,
MoreArgs &&... rest )

helper for call_foreach: general recursive case

Definition at line 35 of file call_foreach.hpp.

◆ call_foreach_tuple_impl()

template<typename Functor, typename Tuple, std::size_t... Is>
void call_foreach_tuple_impl ( Functor && f,
Tuple && t,
index_sequence< Is... >  )

helper for call_foreach_tuple

Definition at line 34 of file call_foreach_tuple.hpp.

◆ call_foreach_tuple_with_index_impl()

template<typename Functor, typename Tuple, std::size_t... Is>
void call_foreach_tuple_with_index_impl ( Functor && f,
Tuple && t,
index_sequence< Is... >  )

helper for call_foreach_tuple_with_index

Definition at line 34 of file call_foreach_tuple_with_index.hpp.

◆ call_foreach_with_index_impl() [1/2]

template<size_t Index, typename Functor, typename Arg>
void call_foreach_with_index_impl ( Functor && f,
Arg && arg )

helper for call_foreach_with_index: base case

Definition at line 33 of file call_foreach_with_index.hpp.

◆ call_foreach_with_index_impl() [2/2]

template<size_t Index, typename Functor, typename Arg, typename... MoreArgs>
void call_foreach_with_index_impl ( Functor && f,
Arg && arg,
MoreArgs &&... rest )

helper for call_foreach_with_index: general recursive case

Definition at line 39 of file call_foreach_with_index.hpp.

◆ call_stack() [1/2]

template<typename Functor>
auto call_stack ( const Functor & functor)

Base case for the chaining of functors.

The last functor receives an input element, no emitter and should have no return type. It should therefore store the input parameter externally.

Parameters
functorFunctor that represents the chain end.

Definition at line 42 of file function_stack.hpp.

◆ call_stack() [2/2]

template<typename Functor, typename... MoreFunctors>
auto call_stack ( const Functor & functor,
const MoreFunctors &... rest )

Recursive case for the chaining of functors.

The given functor receives an input element, an emitter and should have no return type. The emitter will be built using the chain of remaining functors.

Parameters
functorCurrent functor to be chained.
restRemaining functors.

Definition at line 61 of file function_stack.hpp.

◆ fold_left_impl() [1/2]

template<typename Reduce, typename Initial, typename Arg>
auto fold_left_impl ( Reduce && r,
Initial && init,
Arg && arg )

helper for fold_left(): base case

Definition at line 30 of file fold_left.hpp.

◆ fold_left_impl() [2/2]

template<typename Reduce, typename Initial, typename Arg, typename... MoreArgs>
auto fold_left_impl ( Reduce && r,
Initial && init,
Arg && arg,
MoreArgs &&... rest )

helper for fold_left(): general recursive case

Definition at line 37 of file fold_left.hpp.

◆ fold_left_tuple_impl()

template<typename Reduce, typename Initial, typename Tuple, std::size_t... Is>
auto fold_left_tuple_impl ( Reduce && r,
Initial && init,
Tuple && t,
index_sequence< Is... >  )

helper for fold_left_tuple: forwards tuple entries

Definition at line 31 of file fold_left_tuple.hpp.

◆ fold_right_impl() [1/2]

template<typename Reduce, typename Initial, typename Arg>
auto fold_right_impl ( Reduce && r,
Initial && init,
Arg && arg )

helper for fold_right: base case

Definition at line 30 of file fold_right.hpp.

◆ fold_right_impl() [2/2]

template<typename Reduce, typename Initial, typename Arg, typename... MoreArgs>
auto fold_right_impl ( Reduce && r,
Initial && init,
Arg && arg,
MoreArgs &&... rest )

helper for fold_right: general recursive case

Definition at line 37 of file fold_right.hpp.

◆ fold_right_tuple_impl()

template<typename Reduce, typename Initial, typename Tuple, std::size_t... Is>
auto fold_right_tuple_impl ( Reduce && r,
Initial && init,
Tuple && t,
index_sequence< Is... >  )

helper for fold_right_tuple: forwards tuple entries

Definition at line 31 of file fold_right_tuple.hpp.

◆ vmap_foreach_impl() [1/2]

template<typename Functor, typename Arg>
auto vmap_foreach_impl ( Functor && f,
Arg && arg )

helper for vmap_foreach: base case

Definition at line 31 of file vmap_foreach.hpp.

◆ vmap_foreach_impl() [2/2]

template<typename Functor, typename Arg, typename... MoreArgs>
auto vmap_foreach_impl ( Functor && f,
Arg && arg,
MoreArgs &&... rest )

helper for vmap_foreach: general recursive case

Definition at line 38 of file vmap_foreach.hpp.

◆ vmap_foreach_tuple_impl()

template<typename Functor, typename Tuple, std::size_t... Is>
auto vmap_foreach_tuple_impl ( Functor && f,
Tuple && t,
index_sequence< Is... >  )

helper for vmap_foreach_tuple: forwards tuple entries

Definition at line 32 of file vmap_foreach_tuple.hpp.

◆ vmap_foreach_tuple_with_index_impl()

template<typename Functor, typename Tuple, std::size_t... Is>
auto vmap_foreach_tuple_with_index_impl ( Functor && f,
Tuple && t,
index_sequence< Is... >  )

helper for vmap_foreach_tuple_with_index: forwards tuple entries

Definition at line 34 of file vmap_foreach_tuple_with_index.hpp.

◆ vmap_foreach_with_index_impl() [1/2]

template<size_t Index, typename Functor, typename Arg>
auto vmap_foreach_with_index_impl ( Functor && f,
Arg && arg )

helper for vmap_foreach_with_index: base case

Definition at line 35 of file vmap_foreach_with_index.hpp.

◆ vmap_foreach_with_index_impl() [2/2]

template<size_t Index, typename Functor, typename Arg, typename... MoreArgs>
auto vmap_foreach_with_index_impl ( Functor && f,
Arg && arg,
MoreArgs &&... rest )

helper for vmap_foreach_with_index: general recursive case

Definition at line 42 of file vmap_foreach_with_index.hpp.