7 Jun
2014
7 Jun
'14
1:37 p.m.
Louis Dionne wrote:
Here's the idea:
auto list = [](auto ...xs) { return [=](auto access) { return access(xs...); }; };
auto head = [](auto xs) { return xs([](auto first, auto ...rest) { return first; }); };
That's very clever. It's also a good example of how C++ continues to acquire expressive power and surprise us after 16 years of being an ISO standard.