Search⌘ K

Template Code Simplification

Explore how C++17's if constexpr feature simplifies template programming by enabling more natural code that replaces earlier techniques like SFINAE and tag dispatching. Understand how to write clearer template functions with fewer tricks and prepare to apply this in practical examples.

We'll cover the following...

Before C++17 if you had several versions of an algorithm - depending on the type requirements - y​ou could use SFINAE or tag dispatching to generate a dedicated overload resolution set.

For ...