compilerplugins/clang/test/stringconstant.cxx |    4 ----
 include/rtl/strbuf.hxx                        |    2 --
 include/rtl/string.hxx                        |    2 --
 include/rtl/stringutils.hxx                   |    2 +-
 include/rtl/ustrbuf.hxx                       |    2 --
 5 files changed, 1 insertion(+), 11 deletions(-)

New commits:
commit af9c3ed6f748781f2a77e676ffe740992788969b
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Wed Oct 11 10:01:50 2023 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Wed Oct 11 14:33:45 2023 +0200

    __cpp_char8_t is generally available now
    
    ...after 1eef07805021b7ca26a1a8894809b6d995747ba1 "Bump baseline to C++20"
    
    Change-Id: I75509f3731357e0e3ae73c3774abd6e4070f605b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157806
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/compilerplugins/clang/test/stringconstant.cxx 
b/compilerplugins/clang/test/stringconstant.cxx
index 1c9fbf192f6d..f5982e2a4977 100644
--- a/compilerplugins/clang/test/stringconstant.cxx
+++ b/compilerplugins/clang/test/stringconstant.cxx
@@ -102,10 +102,6 @@ int main() {
 
     (void) OUString("xxx", 2, RTL_TEXTENCODING_ASCII_US); // expected-error 
{{suspicious 'rtl::OUString' constructor with literal of length 3 and 
non-matching length argument 2 [loplugin:stringconstant]}}
 
-#if !defined __cpp_char8_t
-    (void) OUString(u8"xxx", 3, RTL_TEXTENCODING_ASCII_US); // expected-error 
{{simplify construction of 'OUString' with string constant argument 
[loplugin:stringconstant]}}
-#endif
-
     (void) OUString("\x80", 1, RTL_TEXTENCODING_UTF8); // expected-error 
{{suspicious 'rtl::OUString' constructor with text encoding 
'RTL_TEXTENCODING_UTF8' but non-UTF-8 content [loplugin:stringconstant]}}
 
     (void) OUString("\xC2\x80", 2, RTL_TEXTENCODING_UTF8); // expected-error 
{{simplify construction of 'OUString' with UTF-8 content as OUString(u"\u0080") 
[loplugin:stringconstant]}}
diff --git a/include/rtl/strbuf.hxx b/include/rtl/strbuf.hxx
index 780923ebf67b..bb7f72e78cb5 100644
--- a/include/rtl/strbuf.hxx
+++ b/include/rtl/strbuf.hxx
@@ -122,9 +122,7 @@ public:
     explicit OStringBuffer(bool) = delete;
     explicit OStringBuffer(char) = delete;
     explicit OStringBuffer(wchar_t) = delete;
-#if defined __cpp_char8_t
     explicit OStringBuffer(char8_t) = delete;
-#endif
     explicit OStringBuffer(char16_t) = delete;
     explicit OStringBuffer(char32_t) = delete;
 #endif
diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx
index 72b046e26a0b..bb67c2f46354 100644
--- a/include/rtl/string.hxx
+++ b/include/rtl/string.hxx
@@ -104,7 +104,6 @@ public:
         }
     }
 
-#if defined __cpp_char8_t
 #if HAVE_CPP_CONSTEVAL
     consteval
 #else
@@ -118,7 +117,6 @@ public:
             more.buffer[i] = literal[i];
         }
     }
-#endif
 
     constexpr sal_Int32 getLength() const { return more.length; }
 
diff --git a/include/rtl/stringutils.hxx b/include/rtl/stringutils.hxx
index 2c5d05c82784..b8a978efbcc6 100644
--- a/include/rtl/stringutils.hxx
+++ b/include/rtl/stringutils.hxx
@@ -246,7 +246,7 @@ struct ConstCharArrayDetector< const char[ 1 ], T >
 };
 #endif
 
-#if defined LIBO_INTERNAL_ONLY && defined __cpp_char8_t
+#if defined LIBO_INTERNAL_ONLY
 template<std::size_t N, typename T>
 struct ConstCharArrayDetector<char8_t const [N], T> {
     using Type = T;
diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx
index 54a4b3730b8b..41af86e13119 100644
--- a/include/rtl/ustrbuf.hxx
+++ b/include/rtl/ustrbuf.hxx
@@ -124,9 +124,7 @@ public:
     explicit OUStringBuffer(bool) = delete;
     explicit OUStringBuffer(char) = delete;
     explicit OUStringBuffer(wchar_t) = delete;
-#if defined __cpp_char8_t
     explicit OUStringBuffer(char8_t) = delete;
-#endif
     explicit OUStringBuffer(char16_t) = delete;
     explicit OUStringBuffer(char32_t) = delete;
 #endif

Reply via email to