Articles & Books

New Attributes with C++20--Rainer Grimm

More possibilities.

New Attributes with C++20

by Rainer Grimm

From the article:

With C++20, we got new and improved attributes such as [[nodiscard("reason")]], [[likely]], [[unlikely]], and [[no_unique_address]]. In particular, [[nodiscard("reason")]] allows it to express the intention of your interface way clearer...

The implication of const or reference member variables in C++ -- Lesley Lai

This article discusses why const or reference member variables can be problematic and the workarounds.

The implication of const or reference member variables in C++

by Lesley Lai

From the article:

I decide to write this post because the same problem raises several time by different people on Twitter and the #include <C++> discord server. There are solid reasons on why you should avoid const or reference member variables in C++...

More Lambda Features with C++20--Rainer Grimm

More lambda fun.

More Lambda Features with C++20

by Rainer Grimm

From the article:

Lambdas in C++20 can be default-constructed and support copy-assignment when they have no state. Lambdas can be used in unevaluated contexts. Additionally, they detect when you implicitly copy the this pointer. This means a significant cause of undefined-behavior with lambdas is gone...

My Updated Course is Live! C++ for Beginners--Kate Gregory

Interested?

My Updated Course is Live! C++ for Beginners

by Kate Gregory

From the article:

At the start of the lockdown, Pluralsight made its huge curriculum free to help those who were suddenly needing new skills to find a new job during the pandemic. I saw a huge number of views of my C++ course for those who don't already know how to program. It was ironic, because I was busy updating that course, a process that is finally complete...

C++ Lambda Week: Going Generic--Bartlomiej Filipek

The series continue.

C++ Lambda Week: Going Generic

by Bartlomiej Filipek

From the article:

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!

The C++ Standard Library: The Third Edition includes C++20--Rainer Grimm

Interested?

The C++ Standard Library: The Third Edition includes C++20

by Rainer Grimm

From the article:

I proudly present the third edition of my book: "The C++ Standard Library". The book includes C++20.

With the current C++20 standard, C++ has many libraries to offer. My book's key idea is to give you the necessary information to all the C++ standard libraries in a concise way.