Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/meta/tuple-helper.hpp"
Extensible Adapter to construct a distinct tuple from some arbitrary source type.
This includes the possibility to re-map elements or element positions.
TYPES | sequence of types to use for the tuple |
<em>ElmMapper</em> | a template to extract each constructor argument from the source value. On invocation, we'll pick up the source type from the actual ctor argument, and then invoke this helper template iteratively for each component of the tuple, passing as template arguments
|
_ElmMapper_
template. The sole requirement is that the concrete instance is assignable by the source type and convertible to the individual member type of the target tuple it is invoked for. Moreover, it is possible to build a generic element extractor, which will be specialised on base of the source type accepted. Definition at line 238 of file tuple-helper.hpp.
Public Types | |
using | SequenceIterator = typename BuildIdxIter< TYPES >::Ascending |
meta-sequence to drive instantiation of the ElmMapper | |
Public Member Functions | |
template<class SRC > | |
TupleConstructor (SRC values) | |
Protected Member Functions | |
template<class SRC , size_t... idx> | |
TupleConstructor (SRC values, IndexSeq< idx... >) | |