I have the following function:
template<class T> T Check(int index);
How to write a function, CheckTuple , which, given the type of a tuple, fills a tuple with Check calls?
For instance:
CheckTuple< std::tuple<int, float, std::string> >()
will return the following tuple:
std::make_tuple( Check<int>(1), Check<float>(2), Check<std::string>(3) )
Other issues I see include unpacking a given tuple, rather than creating this method.
source share