Introduction

Get introduced to the concepts we will learn in this chapter.

C++ has the ability to evaluate expressions at compile time, meaning that values are already calculated when the program executes. Even though metaprogramming has been possible since C++98, it was initially very complicated due to its complex template-based syntax. With the introduction of constexpr, if constexpr, and recently, C++ concepts, metaprogramming has become much more similar to writing regular code.

Get hands-on with 1400+ tech skills courses.