matus-chochlik / std_cpp_refl

Proposal to add static reflection to C++
14 stars 2 forks source link

The interface of MetaobjectSequence #10

Open matus-chochlik opened 8 years ago

matus-chochlik commented 8 years ago

meta-ObjectSequence is a metaobject just like anything else with the following trivial operations:

get_size<meta-ObjectSequence> -> integral-constant
get_element<meta-ObjectSequence, Index> -> meta-Object

and the following operation for convenience:

template <ObjectSequence MoS, template <class> class Tpl>
struct unpack_sequence
{
    typedef Tpl<Mo0, Mo1, Mo2, ...> type;
};

Questions:

[1] http://kifri.fri.uniza.sk/~chochlik/mirror-lib/html/doxygen/mirror/html/d2/d16/structmirror_1_1mp_1_1range.html

ricardofandrade commented 8 years ago

My $0.02: