Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/meta/function-closure.hpp"
Builder for a tuple instance, where only some ctor parameters are supplied, while the remaining arguments will be default constructed.
The use case is creating of a function binder, where some arguments shall be passed through (and thus be stored in the resulting closure), while other arguments are just marked as "Placeholder" with std::_Placeholder<i>
. These placeholder marker terms just need to be default constructed, and will then be stored into the desired positions. Later on, when actually invoking such a partially closed function, only the arguments marked with placeholders need to be supplied, while the other arguments will use the values hereby "baked" into the closure.
TAR | full target tuple type. Some oft the elements within this tuple will be default constructed, some will be initialised from the SRC tuple |
SRC | argument tuple type, for the values actually to be initialised here. |
start | position within TYPES, at which the sequence of init-arguments starts; all other positions will just be default initialised |
Definition at line 420 of file function-closure.hpp.
Public Types | |
template<size_t i> | |
using | DestType = typename std::tuple_element< i, TAR >::type |
Static Public Member Functions | |
static constexpr bool | useArg (size_t idx) |
define those index positions in the target tuple, where init arguments shall be used on construction. More... | |
Classes | |
struct | IndexMapper |
struct | IndexMapper< idx, false > |
|
inlinestatic |
define those index positions in the target tuple, where init arguments shall be used on construction.
All other arguments will just be default initialised.
Definition at line 432 of file function-closure.hpp.