How are the __cplusplus directive defined in various compilers?

199711L (until C++11), 201103L (C++11), 201402L (C++14), 201703L (C++17), or 202002L (C++20)

https://en.cppreference.com/w/cpp/preprocessor/replace#Predefined_macros
Note that for MSVS, you need to configure the compiler for this. See:

https://docs.microsoft.com/en-us/cpp/build/reference/zc-cplusplus?view=msvc-160
Topic archived. No new replies allowed.