![]() |
Lumiera 0.pre.04
»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 to create 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 SRC, at which the sequence of init-arguments starts; all other positions will just be default initialised |
Definition at line 136 of file function-closure.hpp.
Classes | |
| struct | IndexMapper |
| struct | IndexMapper< idx, false > |
Public Types | |
| template<size_t i> | |
| using | DestType = std::tuple_element_t< i, TAR > |
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. | |
Definition at line 139 of file function-closure.hpp.
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 148 of file function-closure.hpp.
Collaboration diagram for PartiallyInitTuple< SRC, TAR, start >: