I have the following function:
template<class T>
T Check(int index);
How can I write a function, CheckTuple
, which, given a tuple type, populates a tuple with calls to Check
?
For example:
CheckTuple< std::tuple<int, float, std::string> >()
would return the following tuple:
std::make_tuple( Check<int>(1), Check<float>(2), Check<std::string>(3) )
The other questions I see involve unpacking a given tuple, not building one up this way.