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 […]
In the last week, I had several occurrences that again taught me something I already knew – at least in theory. Local build results can be deceiving.
As promised in the last post about CMake, today we’ll use a proper CMake project structure for our “Hello CMake” project.
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.
Last week, we’ve started our little CMake project with a “Hello CMake” one-liner. Now it’s time to expand that example by adding another target and information about the project.
Since I have mentioned CMake in a handful of past blog posts, it is time to give a short introduction for those that don’t know it yet.
Having written about std::variant and std::visit last week, it’s time to string together some modern C++ features to build a naive basic implementation of overload, a proposed C++ feature.
std::variant is a library addition in C++17 for sum types, and std::visit is one of the ways to process the values in a std::variant.
I have written about the code style of having “trailing return types everywhere” in the past. My advice back then was to use them only when necessary. I might have […]
Two weeks ago, I attended the ACCU Conference in Bristol again, and again it was a blast. ACCUConf is by far the most interesting and enjoyable conference I have attended […]