#include<iostream>
class test1 {}; //example, can be anything.
class test2 {}; //example, can be anything.
class test3 {}; //example, can be anything.
template <typename T1, typename T2, typename T3>
class tuple
{
public:
using First = T1;
using Second = T2;
using Third = T3;
};
using my_tuple = tuple<test1, test2, test3>; //Alias tuple<i,j,k>
int main(){
my_tuple::First first_ele; //Variable of test1 derived from T1 on my_tuple alias
my_tuple::Second second_ele; //Variable of test2 derived from T2 on my_tuple alias
my_tuple::Third third_ele; //Variable of test3 derived from T3 on my_tuple alias
printf("%s\n", typeid(first_ele).name()); //prints the type test1
printf("%s\n", typeid(second_ele).name()); //prints the type test2
printf("%s\n", typeid(third_ele).name()); //prints the type test3
}
#include<iostream>
class test1 {}; //example, can be anything.
class test2 {}; //example, can be anything.
class test3 {}; //example, can be anything.
template <typename T1, typename T2, typename T3>
class tuple
{
public:
using First = T1;
using Second = T2;
using Third = T3;
};
using my_tuple = tuple<test1, test2, test3>; //Alias tuple<i,j,k>
int main(){
my_tuple::First first_ele; //Variable of test1 derived from T1 on my_tuple alias
my_tuple::Second second_ele; //Variable of test2 derived from T2 on my_tuple alias
my_tuple::Third third_ele; //Variable of test3 derived from T3 on my_tuple alias
printf("%s\n", typeid(first_ele).name()); //prints the type test1
printf("%s\n", typeid(second_ele).name()); //prints the type test2
printf("%s\n", typeid(third_ele).name()); //prints the type test3
}