Articles & Books

C++ coroutines: The lifetime of objects involved in the coroutine function--Raymond Chen

The series continue.

C++ coroutines: The lifetime of objects involved in the coroutine function

by Raymond Chen

From the article:

We finally hooked up the last missing piece of our coroutine promise implementation. Before we can look at the tradeoffs we’ve made, let’s step back and follow the lifetime of the various objects involved in the coroutine function.

C++ Lambda Story in Print -- Bartlomiej Filipek

<img alt="" data-cke-saved-src="https://www.cppstories.com/2021/images/lambda_print.png" src="https://www.cppstories.com/2021/images/lambda_print.png" 138px;="" height:="" 160px;="" float:="" right;"="" style="float: right; height: 267px; width: 230px;">I'm happy to announce that my book on Lambdas is complete and available in paperback/print version!

C++ Lambda Story in Print

by Bartlomiej Filipek

About the book

I packed my knowledge about lambdas into a beautiful ebook, with lots of examples and additional descriptions. And just as with my book about C++17, I made it available at Leanpub. The platform makes it easy for me to publish new updates, and everyone who has the book can immediately access the latest changes (at no charge). Also, the platform allows you to read it as PDF and Epub, Mobi or Online.

Mathematical constants in C++20

Hightlighting a less known C++20 feature:

Mathematical constants in C++20

by Jens Weller

From the article:

When I researched the library and language features of C++20 for the Meeting C++ Community survey, this feature catched my eye.

And I thought its such a nice small feature, I should mention it on the blog. As all other C++20 blog posts right now seem to be about coroutines. It also is a nice follow up on an old blog of mine: C++ & π, where I showed the various ways of obtaining pi for C++ in 2013...

C++ coroutines: Building a result holder for movable types--Raymond Chen

The series continue.

C++ coroutines: Building a result holder for movable types

by Raymond Chen

From the article:

One of the pieces we need for the simple_promise we use to construct a coroutine is what we have been calling the “result holder”. This is basically a variant that starts out empty, and can atomically transition to holding either the result of a successful coroutine, an exception pointer for a failed coroutine...