Articles & Books

Upcoming C++ User Group meetings in February

The monthly overview on upcoming C++ User Group Meetings:

C++ User Group Meetings in February 2022

by Jens Weller

From the article:

The monthly overview on upcoming meetings of C++ User Groups. Most groups meet online due to the pandemic.

Meeting C++ online organizes 2 events in February: one book & tool fair and a talk about C++ reflections

    16.2 C++ UG Meeting C++ online - February - Design of C++ reflection API with Matúš Chochlík
    17.2 C++ UG Meeting C++ online - Meeting C++ online book & tool fair

Additionally Meeting C++ organizes two trainings in February:

    Modern C++ Design Patterns by Klaus Iglberger
    The Big Four of C++20 by Rainer Grimm

constexpr Functions--Rainer Grimm

The series continue.

constexpr Functions

by Rainer Grimm

From the article:

Today, I continue my story about programming at compile time. After template metaprogramming, the type-traits library, today's topic is constexpr functions in particular...

C++ Templates: How to Iterate through std::tuple: the Basics--Bartlomiej Filipek

Did you ever need it?

C++ Templates: How to Iterate through std::tuple: the Basics

by Bartlomiej Filipek

From the article:

If you have a standard container, it’s easy to use a range-based for loop and iterate over its elements at runtime. How about std::tuple? In this case, we cannot use a regular loop as it doesn’t “understand” tuple’s compile-time list of arguments. That’s why in this article, I’ll show you a few techniques you can use to run through all tuple’s entries...

The Usual Arithmetic Confusions--Shafik Yaghmour

Do you know the conversions?

The Usual Arithmetic Confusions

by Shafik Yaghmour

From the article:

There are a lot of aspects of C++ that are not well understood and lead to all sorts of confusion. The usual arithmetic conversions and the integral promotions are two such aspects. Certain binary operators (arithmetic, relational and spaceship) require their operands to have a common type. The usual arithmetic conversions are the set of steps that gets operands to a common type. While the integral promotions brings integral types smaller than int and unsigned int to either int or unsigned int depending on which one can represent all the values of the source type. This is one of the areas in C++ that comes directly from C, so pretty much all of these examples applies to C as well as C++...

Fixing the crash that seems to be on a std::move operation--Raymond Chen

Which way do you prefer?

Fixing the crash that seems to be on a std::move operation

by Raymond Chen

From the article:

Last time, we looked at a crash that was root-caused to an order of evaluation bug if compiled as C++14. One solution to the problem is to switch to C++17 mode, but presumably the customer isn’t willing to make that drastic a change to their product yet. Maybe there’s something we can do that is less disruptive...

How we used C++20 to eliminate an entire class of runtime bugs--Cameron DaCamara

Always more powerful.

How we used C++20 to eliminate an entire class of runtime bugs

by Cameron DaCamara

From the article:

C++20 is here and has been supported in MSVC since 16.11, but today’s post is not about how you can use it, but rather how we used it to effectively eliminate an entire class of runtime bugs by hoisting a check into compile-time. Let’s get right into it!

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!