Practical constexpr

Speaker: Jason Turner

Audience level: Beginner | Intermediate | Advanced

category

constexpr has come a long way since C++11. And we know that it is now possible to implement entire constexpr parsers allowing for compile-time parsing of things like JSON values. But what does this mean for every day code? Is it practical to apply constexpr throughout your code base? What cost does this incur or advantage does it provide? We will look at specific examples of applying constexpr throughout the ChaiScript codebase and what impact it had on compile time, runtime and compile size.