fork download
template <class .... LotsOfTypes>
void function(LotsOfTypes... LotsOfValues) {
   std::tuple<LotsOfTypes...> t(LotsOfValues...);
   //This uses all the types    This one uses all the values
}

template <class .... LotsOfTypes>
void function(LotsOfTypes... LotsOfValues) {
   std::tuple<std::remove_const<LotsOfTypes>::type...> t();
   //This calls remove_const on each of the types, one at a time, and passes that list to tuple
}
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1: error: ISO C++ does not include variadic templates
prog.cpp:1: error: expected ‘>’ before ‘.’ token
prog.cpp:2: error: variable or field ‘function’ declared void
prog.cpp:2: error: ‘LotsOfTypes’ was not declared in this scope
prog.cpp:7: error: ISO C++ does not include variadic templates
prog.cpp:7: error: expected ‘>’ before ‘.’ token
prog.cpp:8: error: variable or field ‘function’ declared void
prog.cpp:8: error: ‘LotsOfTypes’ was not declared in this scope
stdout
Standard output is empty