From ca58f649196ed6b4ce15d0db3935f7de4cb0f2ea Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 18 Oct 2023 17:04:26 +0200 Subject: Extend /clr /std:c++20 char8_t workaround to old versions of VS 2022 On IRC, pppregin now reported that she ran into the issue addressed by 3c6de7e20e35e37cbddd2d35e065525616deac00 "Fix build against VS 2022 17.7.5" when using (a presumably old version of) VS 2022. And suggests that older versions of VS 2022 used _MSV_VER values 1930...1936, so cover those too here. Change-Id: Ifee80114c5cd39aeabc31907adafb03eb2f388e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158122 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- include/rtl/strbuf.hxx | 2 +- include/rtl/string.hxx | 2 +- include/rtl/stringutils.hxx | 2 +- include/rtl/ustrbuf.hxx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'include/rtl') diff --git a/include/rtl/strbuf.hxx b/include/rtl/strbuf.hxx index e4e4eda1fecd..56f3e2abcc38 100644 --- a/include/rtl/strbuf.hxx +++ b/include/rtl/strbuf.hxx @@ -122,7 +122,7 @@ public: explicit OStringBuffer(bool) = delete; explicit OStringBuffer(char) = delete; explicit OStringBuffer(wchar_t) = delete; -#if !(defined _MSC_VER && _MSC_VER >= 1937 && _MSC_VER <= 1938 && defined _MANAGED) +#if !(defined _MSC_VER && _MSC_VER >= 1930 && _MSC_VER <= 1938 && defined _MANAGED) explicit OStringBuffer(char8_t) = delete; #endif explicit OStringBuffer(char16_t) = delete; diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx index a2be12ab320d..62bf0530e819 100644 --- a/include/rtl/string.hxx +++ b/include/rtl/string.hxx @@ -104,7 +104,7 @@ public: } } -#if !(defined _MSC_VER && _MSC_VER >= 1937 && _MSC_VER <= 1938 && defined _MANAGED) +#if !(defined _MSC_VER && _MSC_VER >= 1930 && _MSC_VER <= 1938 && defined _MANAGED) #if HAVE_CPP_CONSTEVAL consteval #else diff --git a/include/rtl/stringutils.hxx b/include/rtl/stringutils.hxx index 0239505be0d2..3cd66ee6c146 100644 --- a/include/rtl/stringutils.hxx +++ b/include/rtl/stringutils.hxx @@ -247,7 +247,7 @@ struct ConstCharArrayDetector< const char[ 1 ], T > #endif #if defined LIBO_INTERNAL_ONLY \ - && !(defined _MSC_VER && _MSC_VER >= 1937 && _MSC_VER <= 1938 && defined _MANAGED) + && !(defined _MSC_VER && _MSC_VER >= 1930 && _MSC_VER <= 1938 && defined _MANAGED) template struct ConstCharArrayDetector { using Type = T; diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx index cd868b0c6d7b..f41e34aa9d5d 100644 --- a/include/rtl/ustrbuf.hxx +++ b/include/rtl/ustrbuf.hxx @@ -124,7 +124,7 @@ public: explicit OUStringBuffer(bool) = delete; explicit OUStringBuffer(char) = delete; explicit OUStringBuffer(wchar_t) = delete; -#if !(defined _MSC_VER && _MSC_VER >= 1937 && _MSC_VER <= 1938 && defined _MANAGED) +#if !(defined _MSC_VER && _MSC_VER >= 1930 && _MSC_VER <= 1938 && defined _MANAGED) explicit OUStringBuffer(char8_t) = delete; #endif explicit OUStringBuffer(char16_t) = delete; -- cgit