From ec553b96de0b98389ef7b19cde344ca668fdc7fc Mon Sep 17 00:00:00 2001 From: Arendelle <2381642961@qq.com> Date: Sun, 10 Nov 2024 14:20:03 +0800 Subject: [PATCH] fix msvc support for UTF_CPP_CPLUSPLUS support --- source/utf8/core.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/utf8/core.h b/source/utf8/core.h index 627133c..afac99f 100644 --- a/source/utf8/core.h +++ b/source/utf8/core.h @@ -37,7 +37,11 @@ DEALINGS IN THE SOFTWARE. // Otherwise, trust the unreliable predefined macro __cplusplus #if !defined UTF_CPP_CPLUSPLUS - #define UTF_CPP_CPLUSPLUS __cplusplus + #if defined _MSVC_LANG + #define UTF_CPP_CPLUSPLUS _MSVC_LANG + #else + #define UTF_CPP_CPLUSPLUS __cplusplus + #endif #endif #if UTF_CPP_CPLUSPLUS >= 201103L // C++ 11 or later