Type Erasure
/
0 Comments
Type erasure based on templates is a pretty sophisticated technique. It bridges dynamic polymorphism…
A std::advance Implementation with C++98, C++17, and C++20
In my last post, I presented a possible std::advance implementation based on tag dispatching. One of…
Software Design with Traits and Tag Dispatching
Tag Dispatching enables it to choose a function based on the type characteristics. This decision takes…
Policy
Thanks to templates, there are new ways of software design. Policies and traits are two commonly used…
Avoiding Temporaries with Expression Templates
Expression templates are typically used in linear algebra and are "structures representing a computation…
Mixins
In my previous post "More about Dynamic and Static Polymorphism", I used the Curiously Recurring…
More about Dynamic and Static Polymorphism
In my last post, "Dynamic and Static Polymorphism", I introduced dynamic polymorphism. Today, I continue…
Dynamic and Static Polymorphism
Polymorphism is the property that different types support the same interface. In C++, we distinguish…
constexpr if
In today's post, I want to introduce an exciting C++17 feature: constexpr if. constexpr if enables it…
constexpr and consteval Functions in C++20
With C++20, constexpr became way more powerful. Additionally, we have consteval functions in C++20…