From 9bde8a4cb7758e292e23b0d7abc5d54a073f574c Mon Sep 17 00:00:00 2001 From: Basil Fierz Date: Tue, 23 Nov 2021 21:42:29 +0100 Subject: [PATCH] Extend C++20 macros --- src/libs/vcl.core/vcl/config/compiler.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/libs/vcl.core/vcl/config/compiler.h b/src/libs/vcl.core/vcl/config/compiler.h index 5fb73508..a68d2938 100644 --- a/src/libs/vcl.core/vcl/config/compiler.h +++ b/src/libs/vcl.core/vcl/config/compiler.h @@ -53,6 +53,7 @@ // MSVC++ 14.15 _MSC_VER == 1915 (Visual Studio 2017 Update 8) // MSVC++ 14.16 _MSC_VER == 1916 (Visual Studio 2017 Update 9) // MSVC++ 14.20 _MSC_VER == 1920 (Visual Studio 2019) +// MSVC++ 14.30 _MSC_VER == 1930 (Visual Studio 2022) # if (_MSC_VER < 1900) # warning "Minimum supported version is MSVC 2015. Good luck." # endif @@ -70,6 +71,9 @@ // Identify C++ standard #if defined _MSVC_LANG +# if _MSVC_LANG >= 202002L +# define VCL_HAS_STDCXX20 1 +# endif # if _MSVC_LANG >= 201703L # define VCL_HAS_STDCXX17 1 # endif @@ -80,6 +84,9 @@ # define VCL_HAS_STDCXX11 1 # endif #elif defined __cplusplus +# if __cplusplus >= 202002L +# define VCL_HAS_STDCXX20 1 +# endif # if __cplusplus >= 201703L # define VCL_HAS_STDCXX17 1 # endif @@ -90,6 +97,9 @@ # define VCL_HAS_STDCXX11 1 # endif #endif +#ifndef VCL_HAS_STDCXX20 +# define VCL_HAS_STDCXX20 0 +#endif #ifndef VCL_HAS_STDCXX17 # define VCL_HAS_STDCXX17 0 #endif