Summary
Jason comprehensively explores all possible techniques to force C++ compilers to perform calculations at compile time. He explains that simply marking a function or variable as constexpr doesn't guarantee compile-time evaluation, then walks through alternatives including static constexpr, constinit, consteval, non-type template parameters, and wrapper functions like Andreas Fertig's as_constant. The episode concludes with Jason introducing his own consteval_invoke utility for forcing compile-time evaluation.
Related C++ Standard Sections
This episode covers topics found in these sections of the C++ standard:
-
[func.invoke]40% match