Lumiera  0.pre.03
»edit your freedom«
PartiallyInitTuple< SRC, TAR, start > Struct Template Reference

#include "lib/meta/function-closure.hpp"

Description

template<typename SRC, typename TAR, size_t start>
struct lib::meta::func::anonymous_namespace{function-closure.hpp}::PartiallyInitTuple< SRC, TAR, start >

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.

Template Parameters
TARfull target tuple type. Some oft the elements within this tuple will be default constructed, some will be initialised from the SRC tuple
SRCargument tuple type, for the values actually to be initialised here.
startposition within TYPES, at which the sequence of init-arguments starts; all other positions will just be default initialised
See also
lib::meta::TupleConstructor

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 >
 

Member Function Documentation

◆ useArg()

static constexpr bool useArg ( size_t  idx)
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.

+ Collaboration diagram for PartiallyInitTuple< SRC, TAR, start >:

The documentation for this struct was generated from the following file: