Articles & Books

C++20 Coroutines--Martin Bond

A first step.

C++20 Coroutines

by Martin Bond

From the article:

There seems to be a lot of confusion around the implementation of C++20 coroutines, which I think is due to the draft technical specification for C++20 stating that coroutines are a work in progress so we can’t expect full compiler and library support at this point in time.

A lot of the problems probably arise from the lack of official documentation about working with coroutines. We have been given C++ syntax support for coroutines (the co_yield and co_return) but without all of what I consider full library support. The standard library has hooks and basic functionality for supporting coroutines, but we must incorporate this into our own classes. I anticipate that there will be full library support for generator style coroutines in C++23.

The C++20 specification is obviously looking to provide support for parallel (or asynchronous) coroutines using co_await, which makes the implementation of a simpler generator style synchronous coroutines more complex. The implementation requirements for our coroutines utilises a Future and Promise mechanism similar to the std::async mechanism for asynchronous threads.

If you are a Python or C# developer expecting a simple coroutine mechanism, you’ll be disappointed because the C++20 general purpose framework is incomplete. Having said that, there are many blogs and articles on the web that include a template class that supports generator style coroutines. This blog contains a usable coroutine template and example code after discussing what a coroutine is...

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

Helping the users.

C++20 Concepts — Complete Guide

by Šimon Tóth

From the article:

One of the well deserved common complaints about C++ is the low quality of compiler errors. Both GCC and Clang made a lot of progress to improve the situation in the past 10 years, but templated code is one area where they can’t really help...

Coercing deep const-ness--Barry Revzin

A complex problem.

Coercing deep const-ness

by Barry Revzin

From the article:

In C++, template deduction doesn’t allow for any conversion. A type matches the pattern, or it’s a deduction failure. But there’s one sort-of exception to this rule, and it’s an exception that everyone has taken advantage of...

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.