struct T1 {};
struct T2: T1 {};
typedef tr2::direct_bases<T2>::type NEW_TYPE ;
should return my something like a touple to bases types. How can I get the nth element of this __reflection_typelist<...>. I search for something like tuple_element for the reflection list.
You can use this simple metafunction to turn the typelist into an
std::tuple
:At this point, you could work with it as you would normally work with a tuple. For instance, this is how you could retrieve elements of the type list: