I am learning C++ and I'd like to know how could create an alias for std::tuple
.
I want to do what you might do with std::tuple
but using another name. Is it possible?
Thanks.
template <typename... Args>
using my_tuple = std::tuple<Args...>;
Live demo link.
You can do that with template alias
template< class... tupleArgs > using newname = std::tuple< tupleArgs... >;
int main()
{
newname<int, std::string, double> t1;
return 0;
}
Simple demo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With