Easily Find Feature Test Macros with the <version> Header
Explore how to easily identify C++20 features using standardized feature test macros in the version header. Learn to check for library and language features with preprocessor directives to write adaptable modern C++ code.
We'll cover the following...
We'll cover the following...
C++ has provided some form of feature test macros for as long as new features have been added. Beginning with C++20, the process is standardized, and all library feature test macros have been added to the <version> header. This will make it much easier to test for a new feature in our code.
This is a useful feature and it's very simple to use.
How to do it
All feature test ...