There are many articles here about variadic generic lambda functions, however I would like a simple explanation on how to access an argument inside the lambda function
pt. I am using an old setup to fetch the arguments, however I want a more generic solution
example - old use :
auto lambda = [](...)
{
va_list args;
va_start(args,0);
auto b = va_arg(args, const char*);
cout << "hello " << b << endl;
va_end(args);
};
lambda();
lambda("world");
shows this:
hello
hello world
I would like to know if it is possible to use variadic template on lambda functions to refactor this into are more generic solution
also how to access individual arguments inside the lambda, not just all in one go