Обложка канала

Библиотека C/C++ разработчика

14677 @cppproglib

Полезные материалы по всему, что может быть полезно плюсовику/сишнику.

Библиотека C/C++ разработчика

3 года назад
Открыть в
5 любопытных примеров C++ Lambda: рекурсия, constexpr, контейнеры и многое другое (включая C++23!) www.cppstories.com/2020/07…5ex.html
5 Curious C++ Lambda Examples: Recursion, constexpr, Containers and More

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.

C++ Stories