Summary
This episode explores several surprising and lesser-known constexpr behaviors in C++. Jason demonstrates how const integral values initialized with constant expressions are implicitly constexpr, despite not being explicitly declared as such. He also shows that constexpr values don't need to be captured in lambdas to be usable inside them, and that lambdas are implicitly constexpr as of C++17 if they can be.
Related C++ Standard Sections
This episode covers topics found in these sections of the C++ standard:
-
[dcl.constexpr]71% match -
[constexpr.functions]64% match