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 […]
The post Constexpr FizzBuzz – An Exercise in Compile-Time Calculations appeared first on Simplify C++!.
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 […]
The post Multiple dispatch over covariant functions appeared first on Simplify C++!.
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 […]
The post algorithms and the KISS principle appeared first on Simplify C++!.
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 […]
The post Reduce Compilation Times With extern template appeared first on Simplify C++!.
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. First of all I’d like to […]
The post std::make_shared vs. the Normal std::shared_ptr Constructor appeared first on Simplify C++!.
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 post Modern C++ Features – Quality-of-Life Features appeared first on Simplify C++!.
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 […]
The post Functions of Variants are Covariant appeared first on Simplify C++!.
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. Recap: […]
The post Overload: Build a Variant Visitor on the Fly appeared first on .
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. Sum types What is a sum […]
The post Modern C++ Features – std::variant and std::visit appeared first on .
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 […]
The post Raw Pointers Are Gonna Stay! appeared first on .
There’s some great news coming from the C++ standards committee: Raw pointers are gone – or rather will be in C++20. Gone, finally Two weeks ago, the ISO C++ standards […]
The post Raw Pointers Are Gone! appeared first on .
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 […]
The post Modern C++ Features – Class Template Argument Deduction appeared first on .