Summary
This episode explores C++20's standardized feature test macros, which provide a compile-time way to check if specific C++ features are supported by the current compiler and standard library implementation. Jason explains how these macros can help write portable code that works across different compilers with varying degrees of C++ standard support. He demonstrates a practical example from his own codebase where he uses these macros to conditionally compile tests based on whether constexpr std::string is available in the implementation.
Related C++ Standard Sections
This episode covers topics found in these sections of the C++ standard:
-
[alg.find]40% match