From d59b65a644ad63309a39db79566c2d43cfbc0760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=E8=AE=B8?= Date: Tue, 3 Nov 2026 14:46:41 +0800 Subject: [PATCH 1/2] fix v140 compile error --- rapidfuzz/details/config.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rapidfuzz/details/config.hpp b/rapidfuzz/details/config.hpp index b17c4aac..175d8f6d 100644 --- a/rapidfuzz/details/config.hpp +++ b/rapidfuzz/details/config.hpp @@ -23,7 +23,9 @@ # define RAPIDFUZZ_IF_CONSTEXPR if #endif -#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201402L) || __cplusplus >= 201402L) +#if defined(_MSC_VER) && !defined(__clang__) && _MSC_VER < 1910 +# define RAPIDFUZZ_CONSTEXPR_CXX14 inline +#elif ((defined(_MSVC_LANG) && _MSVC_LANG >= 201402L) || __cplusplus >= 201402L) # define RAPIDFUZZ_CONSTEXPR_CXX14 constexpr #else # define RAPIDFUZZ_CONSTEXPR_CXX14 inline From 6f9026bb44ed7d3298133f8f0b15de04882d17ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=E8=AE=B8?= Date: Tue, 3 Nov 2026 14:47:58 +0800 Subject: [PATCH 2/2] fix v140 compile error --- extras/rapidfuzz_amalgamated.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extras/rapidfuzz_amalgamated.hpp b/extras/rapidfuzz_amalgamated.hpp index fc142bbe..c744cfb7 100644 --- a/extras/rapidfuzz_amalgamated.hpp +++ b/extras/rapidfuzz_amalgamated.hpp @@ -447,7 +447,9 @@ struct ShiftedBitMatrix { # define RAPIDFUZZ_IF_CONSTEXPR if #endif -#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201402L) || __cplusplus >= 201402L) +#if defined(_MSC_VER) && !defined(__clang__) && _MSC_VER < 1910 +# define RAPIDFUZZ_CONSTEXPR_CXX14 inline +#elif ((defined(_MSVC_LANG) && _MSVC_LANG >= 201402L) || __cplusplus >= 201402L) # define RAPIDFUZZ_CONSTEXPR_CXX14 constexpr #else # define RAPIDFUZZ_CONSTEXPR_CXX14 inline