Summary
Jason explores the newly available constexpr support for std::vector and std::string in C++20, showing how to use these containers in constexpr contexts. He demonstrates that while these containers can be used within constexpr functions, they cannot escape the constexpr context due to memory allocation rules. This requires a careful approach to transferring computed information from compile-time to runtime, typically by extracting specific values rather than the containers themselves.
Related C++ Standard Sections
This episode covers topics found in these sections of the C++ standard:
-
[utility.as.const]60% match -
[array]40% match