include/o3tl/cppunittraitshelper.hxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 88910a02acf7a006ff3b1556c7cd5c6fde77db34
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Thu Oct 29 08:09:50 2020 +0100
Commit:     Thorsten Behrens <[email protected]>
CommitDate: Mon Nov 1 15:01:01 2021 +0100

    Use the underlying type of char16_t
    
    Change-Id: I5f48f1f3dc379cc57cfeac473f80bec4c4bc38af
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104989
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <[email protected]>
    (cherry picked from commit c8b93a478dc420398b3f70724422a551bb743a70)

diff --git a/include/o3tl/cppunittraitshelper.hxx 
b/include/o3tl/cppunittraitshelper.hxx
index d9f75a61b4c8..2a6fb8836238 100644
--- a/include/o3tl/cppunittraitshelper.hxx
+++ b/include/o3tl/cppunittraitshelper.hxx
@@ -12,6 +12,7 @@
 
 #include <sal/config.h>
 
+#include <cstdint>
 #include <string>
 
 #include <cppunit/TestAssert.h>
@@ -19,7 +20,7 @@
 // ostream << char16_t is deleted since C++20 (but just keep outputting 
numeric values):
 template <> inline std::string 
CppUnit::assertion_traits<char16_t>::toString(char16_t const& x)
 {
-    return assertion_traits<unsigned>::toString(unsigned(x));
+    return 
assertion_traits<std::uint_least16_t>::toString(std::uint_least16_t(x));
 }
 
 #endif

Reply via email to