I wish to do something like this:
template<typename ...T> struct foo
{
bar<0 /*to index through types in pack*/ ,T...>::type var1;
bar<1 /*to index through types in pack*/ ,T...>::type var2;
...
}
But how would I define bar? No recursion technique comes to mind to do this.
I want a general technique so that I could typedef any particular type from a type pack, not just the two shown in the example.
or mb something like this.
http://liveworkspace.org/code/7de289f128e86eb6006f576cbaf98991