Why Not a Functor and Lambda Story Updates

I’m happy to announce a new update to my book on lambda expressions! A few pages more, and what’s important is that I heavily improved the consistency and some wording. All of that, thanks to valuable input from my readers and C++ experts. And today we’ll also have a look at one wording case - what’s a functor?

READ MORE...

Lambda Week: Tricks

We’re on the last day of the lambda week. We have all the essential knowledge, and now we can learn some tricks! The Series This blog post is a part of the series on lambdas: The syntax changes (Tuesday 4th August) Capturing things (Wednesday 5th August) Going generic (Thursday 6th August) Tricks (Friday 5th August)(this post) +[]() Have a closer look:

READ MORE...

Lambda Week: Going Generic

We’re in the third day of the lambda week. So far, you’ve learned basic syntax and how to capture things. Another important aspect is that lambdas can also be used in the “generic” scenarios. This is especially possible since C++14 where we got generic lambdas (auto arguments), and then in C++20, you can even specify a template lambda!

READ MORE...

Lambda Week: Capturing Things

We’re in the second day of the lambda week. Today you’ll learn about the options you have when you want to capture things from the external scope. Local variables, global, static, variadic packs, this pointer… what’s possible and what’s not? The Series This blog post is a part of the series on lambdas:

READ MORE...

Lambda Week: Syntax changes, C++11 to C++20

Let’s start the week with Lambda Expressions. The plan is to have a set of concise articles presenting core elements of lambda expressions. Today you can see how the syntax has evolved starting since C++11 and what are the latest changes in C++20. The Series This blog post is a part of the series on lambdas:

READ MORE...

C++ Lambda Story is 100% Complete!

I’m pleased to announce that I’ve finished the work on the latest update for C++ Lambda Story! This makes the book complete now, and I can finally set its status to 100%! Read on to see the latest changes. It got more than 50 new pages! Changes Last time the book had 95 pages, and with the recent additions, it reached 146!

READ MORE...

Lambdas: From C++11 to C++20, Part 2

In the first part of the series we looked at lambdas from the perspective of C++03, C++11 and C++14. In that article, I described the motivation behind this powerful C++ feature, basic usage, syntax and improvements in each of the language standards. I also mentioned several corner cases. Now it’s time to move into C++17 and look a bit into the future (very near future!

READ MORE...

Lambdas: From C++11 to C++20, Part 1

Lambda expressions are one of the most powerful additions to C++11, and they continue to evolve with each new C++ language standard. In this article, we’ll go through history and see the evolution of this crucial part of modern C++. The second part is available: Lambdas: From C++11 to C++20, Part 2

READ MORE...