I would like to have a function parameters of the template type of the variadic template class. How can the following code be well-formed?
template <typename T>
struct Foo {
typedef T Base;
};
template <typename... Targs>
struct Bar {
void get(Targs::Base... args) {} /// Type of the typedef Base of Foo!
};
int main() {
Bar<Foo<int>, Foo<double>> bar;
int i = 0;
double j = 0.0;
bar.get(i, j);
}
Using GCC 4.9 C++11 or 5.3.