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 […]
Modern C++ Features
Features added in C++11 and later
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.
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.
Contrary to Sunday’s orchestrated April Fool’s posts, raw pointers are not going anywhere. However, there are some things in those posts that are based on reality. I’ll go into a […]
There’s some great news coming from the C++ standards committee: Raw pointers are gone – or rather will be in C++20.
With C++17, we get class template argument deduction. It is based on template argument deduction for function templates and allows us to get rid of the need for clumsy make_XXX […]
A few days ago, a colleague asked me if it was wise to make every class a final class. Here is a more sophisticated answer than I could give at […]
Last year, I have written about constexpr and compile time constants in general. Last week, the Draft International Standard for C++17 has been sent to its ballot. Time to provide […]
This week I exchange guest posts with Jonathan Müller about accessing tuple elements. Jonathan is a CS student passionate about C++. He’s working on various C++ projects like memory, an […]