I have a class that contains a tuple of variable types, such as:
template<class... Ts> struct Tester { std::tuple<Ts...> t; template<class... T2s> std::tuple<T2s...> Get() { ??? } };
Instance example Tester<int, float, char>
I want my Get function to return only a subset of the inner tuple. For example, tester.Get<int, char>
will return the value std::tuple<int, char>
, the values โโof which will be copied from the corresponding elements of the internal tuple.
It can be assumed that each type appears at most once in a tuple and that Get
will be called only with reasonable template parameters that are in the tuple.
source share