PayloadOffset_t: A small type design challenge
Recently, I had to make a relatively small design decision – which type to use for a small range of values. As usual in C++, there were a number of […]
Features added in C++11 and later
Recently, I had to make a relatively small design decision – which type to use for a small range of values. As usual in C++, there were a number of […]
Recently, I have given a workshop about language features introduced in C++14 and C++17. Since a major part of those features includes constexpr things, I gave my trainees the task […]
Today we have another guest post by Alfredo Correa. In his previous article, Functions of variants are covariant, Alfredo described the concept of a covariant function, that is, how a […]
You’ve probably heard about the rule to prefer standard algorithms over raw for loops. The major reason is that those algorithms say what is happening in the name and encapsulate […]
Today, I have a guest post by Daniele Pallastrelli about extern template for you. Daniele has been programming and designing software for the last 20+ years and he’ s passionate […]
There are two different ways to create a std::shared_ptr: via one of its constructors and via std::make_shared. Both have their merits and different tradeoffs.
With the new C++ standards, we got a lot of features that feel like “quality-of-life” features. They make things easier for the programmer but do not add functionality that wasn’t […]
The term “Modern C++” is often used interchangeably with “Code using the new C++ standard”. Here, “new” may be anything from C++11 to C++17 or even whatever is available of […]
Today I am happy to present a guest post by Alfredo Correa about covariant visitors for std::variant. Alfredo works at Lawrence Livermore National Laboratory where he uses C++ to develop […]
Sometimes we want to express the state of “nothing meaningful” instead of a value. This is the use case for C++17’s std::optional.