Articles & Books

C++20 Modules — Complete Guide--Šimon Tóth

Are you ready to use them?

C++20 Modules — Complete Guide

by Šimon Tóth

From the article:

Compilers and build systems are slowly starting to support C++20 modules. Perfect time for you to read this guide and benefit from the massive compilation speedups. This article reflects the state as of September 2021...

Ordering asynchronous updates with coroutines--Raymond Chen

Will you use it?

Ordering asynchronous updates with coroutines, part 1, part 2, part 3, part 4, part 5

by Raymond Chen

From the article:

I opined some time ago on the perils of holding a lock across a coroutine suspension point. But say you have a bunch of asynchronous activity that you want to serialize. How can you do that without a lock?

There are a few different scenarios in which you may need to protect asynchronous activity. We’ll look at them over the next few days...

Meeting C++ 2021: choosing the online platform

Meeting C++ reveals on which online platform the conference and the online C++ User Group will be hosted this year.

Choosing Hubilo as an online platform for Meeting C++ 2021

by Jens Weller

From the article:

During July and August I did compare many online platforms, to choose the one to host this years online conference and the events of Meeting C++ online in. The winner is Hubilo.

Its been a difficult and time consuming process to compare the various platforms and get a feel for what online events will have a look and feel in 21/22 when choosing a certain platform. I'd like to be able to host all formats of the online User Group in one platform: the talks, the panels and especially the online fairs for C++ jobs/recruiting and tooling. This years conference will host all these event types too!

Upcoming C++ User Group meetings in September

A listing of the upcoming C++ User Group Meetings in September

C++ User Group Meetings in September 2021

by Jens Weller

From the article:

The monthly overview about upcoming C++ User Group Meetings in September. As the pandemic ends or continues, depending in which part of the world you live, I list again all meetings online and real world.

Meeting C++ online hosts two events in September:

    16.9 C++ UG Meeting C++ online - September - Windows, macOS and the Web: Lessons from cross-platform
    28.9 C++ UG Meeting C++ online - Online C++ job fair (afternoon CEST)
    29.9 C++ UG Meeting C++ online - Online C++ job fair (evening CEST)

Meeting C++ is still looking for employers to participate in the online job fair, register your spot with in the next days to be best visible for this event.

Asynchronous Stacks and Scopes--Eric Niebler

A revolution?

Asynchronous Stacks and Scopes

by Eric Niebler

From the article:

In Structured Concurrency, I talk about what structured concurrency is and why it’s a big deal for C++ especially. In this post I discuss some more interesting properties of asynchronous code that is structured: async stacks and async scopes...

The First Big Update of My C++20 Book--Rainer Grimm

Will you get it?

The First Big Update of My C++20 Book

by Rainer Grimm

From the article:

I'm happy to announce the first big update of my C++20 book. The update was mainly due to the improved C++ compiler support of C++20. The update includes concepts, the ranges library, modules, the three-way comparison operator, the format library, and the chrono library.

Empty Base Class Optimisation, no_unique_address and unique_ptr--Bartlomiej Filipek

Life made easier.

Empty Base Class Optimisation, no_unique_address and unique_ptr

by Bartlomiej Filipek

From the article:

C++20 added a couple of new attributes in the form of [[attrib_name]]. One of them - [[no_unique_address]] - can have surprising effects on the code! In this blog post, you’ll learn how to optimize your classes' layout and make some data members “disappear”. In most cases, it will be just one line of C++20 code.

Let’s go...

How to Define Comparison Operators by Default in C++--Jonathan Boccara

Do you know?

How to Define Comparison Operators by Default in C++

by Jonathan Boccara

From the article:

Implementing comparison operators in C++ is easier said than done.

Indeed, for most types, if we could talk to the compiler we would say something like: “to order them, use a lexicographical order on their members”.

But when it comes to writing the corresponding code, things get more complicated.

However, a classical technique using std::tuple makes the code much more concise for comparison operators, and it should be used by default. (At least before C++20, as C++20 made comparison operators even easier to write).

Let’s see the technique involving std::tuple and then how the comparison operators situation evolves with C++20...