PolicyAndTraits

Type Erasure

/
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…
PolicyAndTraits

Software Design with Traits and Tag Dispatching

/
Tag Dispatching enables it to choose a function based on the type characteristics. This decision takes…
PolicyAndTraits

Policy

/
Thanks to templates, there are new ways of software design. Policies and traits are two commonly used…
ExpressionTemplates

Avoiding Temporaries with Expression Templates

/
Expression templates are typically used in linear algebra and are  "structures representing a computation…
StaticDynamic

Mixins

/
In my previous  post "More about Dynamic and Static Polymorphism", I used the Curiously Recurring…
StaticDynamic

More about Dynamic and Static Polymorphism

/
In my last post, "Dynamic and Static Polymorphism", I introduced dynamic polymorphism. Today, I continue…
StaticDynamic

Dynamic and Static Polymorphism

/
Polymorphism is the property that different types support the same interface. In C++, we distinguish…
constexprIf

constexpr if

/
In today's post, I want to introduce an exciting C++17 feature: constexpr if. constexpr if enables it…
constexpr

constexpr and consteval Functions in C++20

/
With C++20, constexpr became way more powerful. Additionally, we have  consteval functions in C++20…