News

Parameter Passing in C and C++--Scott Wolchok

Let's go down to the metal.

Parameter Passing in C and C++

by Scott Wolchok

From the article:

Now that we know how to read assembly language, we can talk about how parameter passing works at the machine level and its consequences for writing faster code. We will focus on x86_64, but ARM64 works in a roughly similar way...

Concise Result Extraction in Modern C++--David Gorski

Template magic.

Concise Result Extraction in Modern C++

by David Gorski

From the article:

A popular idiom in functional programming is the use of sum types to express results or optional values. When a function returns, it either succeeded and we get the result, or it failed and we have an error on our hands. This is a pattern in Modern C++ as well, enabled by standard library types such as std::variant and std::optional. In this article we will explore how to improve the ergonomics of handling multiple results and potential error values...

Lazy Futures with Coroutines--Rainer Grimm

Another one.

Lazy Futures with Coroutines

by Rainer Grimm

From the article:

Based on the coroutines-based implementation of a simple future in my last post "Implementing Simple Futures with Coroutines", I want to go today one big step further. I analyze the workflow of the simple future and make it lazy...

CLion 2021.1 EAP: Branch Coverage, New MISRA Checks, and Remote Makefile projects--Anastasia Kazakov

Interested?

CLion 2021.1 EAP: Branch Coverage, New MISRA Checks, and Remote Makefile projects

by Anastasia Kazakova

From the article:

A new CLion 2021.1 EAP build (211.6305.15) is now available from our website, via the Toolbox App, or as a snap package (if you are using Ubuntu). Note that if you are on macOS, there is a separate build for Apple Silicon (M1 chip)...

Creating a co_await awaitable signal that can be awaited multiple times, part 4--Raymond Chen

The series continue.

Creating a co_await awaitable signal that can be awaited multiple times, part 4

by Raymond Chen

From the article:

Last time, we created an awaitable signal that can be awaited multiple times, operating entirely in user mode. However, it did perform memory allocations, and that could result in low-memory exceptions. Furthermore, it used a std::vector, and pushing a value onto the vector could take a long time if the vector needs to be reallocated...

CopperSpice: Memory Model to Mutexes

New video on the CopperSpice YouTube Channel:

Memory Model to Mutexes

by Barbara Geller and Ansel Sermersheim

About the video:

We have released a new video which expands on our C++ Memory Model discussion. This section covers the usage of Mutexes and how they interact with the memory model. We define mutexes and locks, and pose some questions you may not have considered before.

Please take a look and remember to subscribe!