In C++0x I would like to write a function like this:
template <typename... Types>
void fun(typename std::tuple<Types...> my_tuple) {
//Put things into the tuple
}
I first tried to use a for loop on int i and then do:
get<i>(my_tuple);
And then store some value in the result. However, get only works on constexpr.
If I could get the variables out of the tuple and pass them to a variadic templated function I could recurse through the arguments very easily, but I have no idea how to get the variables out of the tuple without get. Any ideas on how to do that? Or does anyone have another way of modifying this tuple?