From 44344000f0fa32e66787d6d2c9ff5ddfd3605df7 Mon Sep 17 00:00:00 2001 From: Alexej Harm Date: Thu, 12 Sep 2019 16:33:06 +0200 Subject: [PATCH] Fix MSVC C++ version detection --- include/date/date.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/date/date.h b/include/date/date.h index 35c635d..fce6200 100644 --- a/include/date/date.h +++ b/include/date/date.h @@ -137,7 +137,7 @@ namespace date #endif #ifndef HAS_UNCAUGHT_EXCEPTIONS -# if __cplusplus > 201703 +# if __cplusplus > 201703 || (defined(_MSVC_LANG) && _MSVC_LANG > 201703L) # define HAS_UNCAUGHT_EXCEPTIONS 1 # else # define HAS_UNCAUGHT_EXCEPTIONS 0 @@ -145,7 +145,7 @@ namespace date #endif // HAS_UNCAUGHT_EXCEPTIONS #ifndef HAS_VOID_T -# if __cplusplus >= 201703 +# if __cplusplus >= 201703 || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) # define HAS_VOID_T 1 # else # define HAS_VOID_T 0