Excellent. This now supports the variadic generic lambda from the spec
(albeit without the auto parameter pack)
auto vglambda = [](auto printer)
{
// TODO: return [=](auto&& ... ts) // OK: ts is a function
parameter pack
return [=] <typename... T> (T&& ... ts) // OK: ts is a function
parameter pack
{
printer(std::forward<decltype(ts)>(ts)...);
return [=]()
{
printer(ts ...);
};
};
};
auto p = vglambda( [](auto v1, auto v2, auto v3)
{
std::cout << v1 << v2 << v3;
} );
auto q = p(1, 'a', 3.14); // OK: outputs 1a3.14
q(); // OK: outputs 1a3.14
Just need to get 'auto...' working now for C++14 generic lambda
conformance. (I'm still trying!)
Cheers,
Adam