diff --git a/googletest/include/gtest/gtest-printers.h b/googletest/include/gtest/gtest-printers.h index 198a76934..bbb0fa7e7 100644 --- a/googletest/include/gtest/gtest-printers.h +++ b/googletest/include/gtest/gtest-printers.h @@ -521,11 +521,15 @@ GTEST_API_ void PrintTo(wchar_t wc, ::std::ostream* os); GTEST_API_ void PrintTo(char32_t c, ::std::ostream* os); inline void PrintTo(char16_t c, ::std::ostream* os) { - PrintTo(ImplicitCast_(c), os); + // TODO(b/418738869): Incorrect for values not representing valid codepoints. + // Also see https://github.com/google/googletest/issues/4762. + PrintTo(static_cast(c), os); } #ifdef __cpp_lib_char8_t inline void PrintTo(char8_t c, ::std::ostream* os) { - PrintTo(ImplicitCast_(c), os); + // TODO(b/418738869): Incorrect for values not representing valid codepoints. + // Also see https://github.com/google/googletest/issues/4762. + PrintTo(static_cast(c), os); } #endif