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 +#include #include #include @@ -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::toString(char16_t const& x) { - return assertion_traits::toString(unsigned(x)); + return assertion_traits::toString(std::uint_least16_t(x)); } #endif