Add structurechain tuple-based getter (#292)

This commit is contained in:
Wunkolo 2019-03-11 07:25:31 -07:00 committed by Andreas Süßenbach
parent f0dc8d6f38
commit a08954c470

View File

@ -4549,6 +4549,15 @@ int main( int argc, char **argv )
template<typename ClassType> ClassType& get() { return static_cast<ClassType&>(*this);}
template<typename ClassTypeA, typename ClassTypeB, typename ...ClassTypes>
std::tuple<ClassTypeA, ClassTypeB, ClassTypes...> get()
{
return std::tuple_cat(
std::make_tuple(get<ClassTypeA>(),get<ClassTypeB>()),
std::make_tuple(get<ClassTypes>()...)
);
}
private:
template<typename List, typename X>
void link()