January 2022

C++20 Concurrency — Part 2: jthreads--Gajendra Gulgulia

More convenience.

C++20 Concurrency — Part 2: jthreads

by Gajendra Gulgulia

From the article:

In this part of the issue, I’ll discuss about the new std::jthread that helps us avoid the boilerplate code for joining the conventional std::thread in the first section. In the end, I’ll also mention about the std::swap algorithm’s specialization introduced in C++20 to swap the underlying thread handles associated with std::jthread ...

20 Smaller yet Handy C++20 Features--Bartlomiej Filipek

And handy they are.

20 Smaller yet Handy C++20 Features

by Bartlomiej Filipek

From the article:

C++20 is huge and filled with lots of large features. Just to mention a few: Modules, Coroutines, Concepts, Ranges, Calendar & Timezone, Formatting library.

But, as you know, that’s not all.

Depending on how we count, C++20 brought around 80 Library features and 70 language changes, so there’s a lot to cover smile

In this article, I’ll show you 20 smaller C++20 things that are very handy and good to know. Ten language elements, and ten more for the Standard Library. Most of them with a cool example.

Let’s jump right into the text!

Improving Stability with Modern C++, Part 4 — Memory Management

Smart pointers

Improving Stability with Modern C++, Part 4 — Memory Management

by Ralph Kootker

From the article

When we started learning C++, we were all taught that every new needs a corresponding delete. But sometimes we'd forget, or some code might throw an exception we weren't ready for, and then we'd leak memory. [...] With rare exceptions, C++ programmers should not have to write new or delete ever again.

C++ at the end of 2021 -- Bartlomiej Filipek

10th edition of “C++ at the end”!

C++ at the end of 2021 @C++ Stories

by Bartlomiej Filipek

About the blog

See what happened this year in the C++ World!

New features, plans for the language, updated tools and compilers, conferences, books, and more!

What was the most important event this year? The pandemic? C++20 adoption? Ongoing work for C++23 or something else?

Design and evolution of constexpr in C++

constexpr is one of the magic keywords in modern C++. You can use it to create code, that is then executed before the compilation process ends. This is the absolute upper limit for software performance.

Design and evolution of constexpr in C++

by Evgeny Shulgin

From the article:

The authors suffered greatly from the inability to use STL containers and wrote the std::vector and std::map analogues. Inside, these analogues have std::array that can work in constexpr. Proposal [P0784] Standard containers and constexpr studies the possibility of inputting STL containers in constexpr evaluations. Note. It's important to know what an allocator is. STL containers work with memory through it. What kind of an allocator — is specified through the tempte argument. If you want to get into the topic, read this article.

Outcome enters sustaining phase, goes ABI stable--Niall Douglas

Will you use it?

Outcome enters sustaining phase, goes ABI stable

by Niall Douglas

From the article:

After three years of maturing, I am pleased to announce that the Spring release of Outcome, an alternative error handling framework, will enter its sustaining phase and thus it will be able to formally guarantee ABI stability going forth. ABI stability is tested per commit by CI and the specifics of the guarantees is documented here...

2021 C++ Standardization Highlights--Botond Ballo

Did you follow?

2021 C++ Standardization Highlights

by Botond Ballo

From the article:

The ISO C++ Standards Committee (also known as WG21) has not met in person since its February 2020 meeting in Prague, which I wrote about here.

However, the committee and its subgroups have continued their work through remote collaboration, and a number of notable proposals have been adopted into C++23, the next language version, in this way, with many others in the pipeline.

In this post, I will outline some of the highlights of the committee’s work in 2021. (The post will also cover some material from the latter part of 2020, a period when remote collaboration was already underway but which I have not covered in any previous post.) I’ve been less involved in the committee than before, so this post will not be as comprehensive as my previous trip reports, but I hope to share the proposals I’ve found most notable...