In this blog post I’ll show you a couple of interesting examples with lambda expressions. Do you know how to write a recursive lambda? Store them in a container? Or invoke at compile time?
See in the article.
Updated in August 2022: Added C++23 improvements.
1. Recursive Lambda with std::function Writing a recursive function is relatively straightforward: inside a function definition, you can call the same function by its name.