I am learning C ++ and I would like to know how to create an alias for std::tuple.
std::tuple
I want to do what you can do with std::tuple, but using a different name. Is it possible?
Thank.
template <typename... Args> using my_tuple = std::tuple<Args...>;
Live demo link.
You can do this with a template alias
template< class... tupleArgs > using newname = std::tuple< tupleArgs... >; int main() { newname<int, std::string, double> t1; return 0; }
Simple demonstration