I'm using variadic templates to capture static type information in Isis2, an atomic multicast library (isis2.codeplex.com). Some Isis2 events are delivered via upcall. For example if you code
Group g("myGroup");
g.Handlers[UDPATE] += [](string& name, Foo& f) { ... your code };
....
g.OrderedSend(UPDATE, "John Doe", new Foo(...));
then on receiving a multicast in group g carrying an update with a string and a Foo object in it, Isis2 would construct a local instance of the Foo object and then upcall to this lambda with the appropriate arguments.
So here's my puzzle. I have the variadic code to scan the arguments to OrderedSend and can capture the static type information needed to build my messages. I end up passing the real OrderedSend method a one-dimensional array of arguments, each with its type, a pointer or safe reference to the data or object, and for an object, the address of a marshaling method. But to use a variadic template to scan the lambda, I need to look at "inner argument list" of the function, in the sense that the object being added to the vector of handlers is a lambda: the type_traits methods will just say that it is an object of type "function". I'm after the string and Foo types, from the argument list of the lambda. But type_traits.h lacks anything for accessing the argument list, as far as I can see.
A GCC-11 specific option is to unmangle the typeid and parse the resulting string. But is there a variadic template feature that would let me get to the argument list of the lambda at compile time?