Summary
Jason explores C++20's Class Non-Type Template Parameters (CNTTP), showing how they enable the use of compile-time known values in contexts where only constant expressions are allowed. He demonstrates how CNTTP extends the capabilities of template parameter values beyond the traditional integral types, allowing user-defined types to be used as non-type template parameters. The episode highlights the syntax differences between compile-time template parameters (in angle brackets) and runtime parameters (in parentheses), while also noting compiler support limitations at the time of recording.
Related C++ Standard Sections
This episode covers topics found in these sections of the C++ standard:
-
[dcl.constexpr]73% match -
[utility.as.const]63% match -
[temp.arg.nontype]60% match -
[temp.fct]57% match -
[arithmetic.operations.negate]56% match -
[complex.tuple]56% match -
[meta.help]55% match -
[temp.deduct.general]55% match -
[complex.ops]53% match -
[cmplx.over]53% match