It's too early for that.
Until the standard replaces it, use:
#if __cplusplus > 201703L
// C++20 code
#endif
since the predefined macro of C++20 is going to be larger than the one of C++17.
As @SombreroChicken's answer mentions, [cpp.predefined] (1.1) specifies (emphasis mine):
__cplusplus
The integer literal 201703L
. [Note: It is intended that future versions of this International Standard will replace the value
of this macro with a greater value.]
The macros used, as of Nov 2018, are:
- GCC 9.0.0:
201709L
for C++2a. Live demo
- Clang 8.0.0:
201707L
. Live demo
- VC++ 15.9.3:
201704L
(as @Acorn's answer mentions).
PS: If you are interested in specific features, then [cpp.predefined] (1.8) defines corresponding macros, which you could use. Notice though, that they might change in the future.