I am looking for something like that:
template< typename T>
void func(T t)
{
}
template< typename... Parms>
void anyFunc( Parms... p)
{
f
How about a small helper class:
template struct Caller
{
static void call(Func & f, A && a, Args && ...args)
{
f(std::forward(a));
Caller::call(f, std::forward(args)...);
}
};
template struct Caller
{
static void call(Func & f, A && a)
{
f(std::forward(a));
}
};
template
void Call(Func & f, Args && ...args)
{
Caller::call(f, std::forward(args)...);
}
Then you can put the following in your client code:
void foo(A);
Call(foo, a1, a2, a3);