Entries by Rainer Grimm

std::execution: Inclusive Scan

Inclusive scan solves problems related to range queries, such as calculating the sum of a range of elements in an array. It is also used in range minimum queries and various other algorithms. Before I present the asynchronous inclusive scan, I introduce the inclusive scan, aka prefix sum. Prefix Sum In computer science, the prefix […]

Christmas Special

Make the Difference Let’s do something great together: From December 1st to 24th, when you book one of my mentoring programs, I will donate half of the money to ALS research. I will publish an update each week so we can see what we have achieved so far. Here’s more information about me, the structure […]

std::execution: Asynchronous Algorithms

std::execution supports many asynchronous algorithms for various workflows. Presenting proposal P2300R10 is not easy. First, it is very powerful, and second, it is very long. Therefore, I concentrate on specific aspects of the proposal. What are the priorities of this proposal? Priorities The terms execution resource, execution agent, and scheduler are essential for the understanding […]

My ALS Journey (17/n): Christmas Special

Today, I have a special Christmas gift. >> My ALS Journey so far << Make the Difference Let’s do something great together: From December 1st to 24th, when you book one of my mentoring programs, I will donate half of the money to ALS research. I will publish an update each week so we can […]

std::execution

std::execution, previously known as executors or Senders/Receivers, provides “a Standard C++ framework for managing asynchronous execution on generic execution resources“. (P2300R10) Side Note Change of plans. My original plan was to present the C++26 library after the core language. However, the implementation status of the library is not good enough. Therefore, I decided to continue […]

C++26 Core Language: Small Improvements

There are more small improvements in the C++26 language, which you should know. static_assert extension First, here’s the syntax of static_assert in C++11: static_assert(compile time predicate, unevaluated string) With C++26, the string can be a user-defined type having the following properties: static_assert can now be used with a format string. Here’s a nice example from […]

My ALS Journey (16/n): Good Bye Training / Hello Mentoring

In 2025, I will no longer offer C++ classes. Instead, I will only offer C++ mentoring in the future. >> My ALS Journey so far << Today’s report is very technical. I explain why I switched from training to mentoring. This switch is also due to the fact that I cannot integrate classes anymore in […]

Placeholders and Extended Character Set

Placeholders are a nice way to highlight variables that are no longer needed. Additionally, the character set of C++26 will be extended. Placeholders Structured bindings are a C++17 feature that allows you to bind multiple variables to the elements of a structured object. The following program demonstrates using tuples and structured bindings to return and […]

Contracts in C++26

Contracts allow you to specify preconditions, postconditions, and invariants for functions. Contracts should already be part of C++20 but were removed in the standard meeting in Cologne. Here is what Herb Sutter said about contracts on Sutter’s Mill: “contracts is the most impactful feature of C++20 so far, and arguably the most impactful feature we […]

Reflection in C++26: Determine the Layout

Thanks to reflection, you can determine the layout of types. My examples are based on the reflection proposal P2996R5. Class Layout The following program determines the class layout of a few members. // classLayout.cpp #include <experimental/meta> #include <iostream> #include <utility> #include <vector> #include <array> struct member_descriptor { std::size_t offset; std::size_t size; bool operator==(member_descriptor const&) const […]