Summary
This episode explores a new C++20 feature allowing virtual functions to be constexpr, which was previously disallowed in C++17 and earlier. Jason demonstrates the syntax and explains how this enables polymorphic behavior at compile time by building a simple example with a base class and derived implementations. The feature opens possibilities for moving complex polymorphic operations from runtime to compile time, potentially improving performance in critical applications.
Related C++ Standard Sections
This episode covers topics found in these sections of the C++ standard:
-
[class.virtual]72% match -
[facet.ctype.char.virtuals]64% match