diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-07-19 08:27:02 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-07-19 10:24:45 +0200 |
commit | e83e62fe376a91f7270435e06ee7f6864c48fb4b (patch) | |
tree | 0f869c82747bb36abc4a113d0c1f070458a65051 /include | |
parent | fd361874d5c4da99dec763dfdc9c4dd21dfe34a6 (diff) |
Work around MSVC bug with "..."_ostr vs. u"..."_ostr
Since 27d1f3ac016d77d3c907cebedca558308f366855 "O[U]String literals (unusable
for now, C++20 only)",
<https://developercommunity.visualstudio.com/t/Using-same-string-literal-suffix-for-cha/10416970>
"Using same string literal suffix for char and char16_t string overloads causes
'no matching overloaded function found'" caused --with-latest-c++ builds to fail
with
> sal/qa/rtl/strings/test_oustring_stringliterals.cxx(432): error C2672: '""_ostr': no matching overloaded function found
> include\rtl/ustring.hxx(3604): note: could be 'rtlunittest::OUString operator ""_ostr(void)'
> include\rtl/string.hxx(2402): note: or 'rtlunittest::OString operator ""_ostr(void)'
> sal/qa/rtl/strings/test_oustring_stringliterals.cxx(432): error C2672: 'CppUnit::assertEquals': no matching overloaded function found
> workdir\UnpackedTarball\cppunit\include\cppunit/TestAssert.h(161): note: could be 'void CppUnit::assertEquals(const T &,const T &,CppUnit::SourceLine,const std::string &)'
> sal/qa/rtl/strings/test_oustring_stringliterals.cxx(432): note: 'void CppUnit::assertEquals(const T &,const T &,CppUnit::SourceLine,const std::string &)': expects 4 arguments - 3 provided
etc. So help MSVC along by renaming from u"..."_ostr to u"..."_ustr for now.
Change-Id: Iad401f0681ac9326b7c57259c5483263ddfbfd4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154634
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/rtl/ustring.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx index 67275ee07932..90b195754a17 100644 --- a/include/rtl/ustring.hxx +++ b/include/rtl/ustring.hxx @@ -3601,7 +3601,7 @@ constexpr rtlunittest:: #endif OUString -operator ""_ostr() { +operator ""_ustr() { return #if defined RTL_STRING_UNITTEST rtlunittest |