I have two templates, one is passed to the other as an argument. I would like to be able to use the Args from the argument in the main template. Or if I have:
template <typename T, typename... Args>
class Foo
{
typedef T Type;
static void foo(Args... args)
{
}
};
template <typename C>
class Bar
{
void bar(Args... args)
{
// do something
C::foo(args...);
}
};
How I can make Args
visible in the template Bar
. Note that with typedef T Type
, I can use C::Type
in Bar
. What is the syntax if possible for the variadic argument?