Clang: Fix detection of C++26 when targeting MSVC ABI

`_MSVC_LANG` may not be defined higher than C++20, but `__cplusplus` is.
This commit is contained in:
Brad King
2024-04-08 18:41:22 -04:00
committed by Raul Tambre
parent 3f08812a6b
commit c7cbe57e1f
2 changed files with 10 additions and 2 deletions

View File

@@ -57,7 +57,11 @@ char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
# define CXX_STD CXX_STD_98
# endif
#elif defined(_MSC_VER) && defined(_MSVC_LANG)
# define CXX_STD _MSVC_LANG
# if _MSVC_LANG > __cplusplus
# define CXX_STD _MSVC_LANG
# else
# define CXX_STD __cplusplus
# endif
#elif defined(__NVCOMPILER)
# if __cplusplus == CXX_STD_17 && defined(__cpp_aggregate_paren_init)
# define CXX_STD CXX_STD_20