From 20f0fa4ec6009c8e000a52954fbf796159875b2e Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Tue, 5 Nov 2024 15:46:28 -0300 Subject: [PATCH] Fix build with libc++ 19 As noted in the libc++ 19 release notes [1], std::char_traits<> is now only provided for char, char8_t, char16_t, char32_t and wchar_t, and any instantiation for other types will fail. This causes emulators/open-vm-tools to fail to compile with clang 19 and libc++ 19. This can be fixed by using the standard type std::u16string for UTF-16 strings, instead of (effectively) std::basic_string. [1] https://libcxx.llvm.org/ReleaseNotes/19.html#deprecations-and-removals --- open-vm-tools/services/plugins/dndcp/stringxx/string.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/open-vm-tools/services/plugins/dndcp/stringxx/string.hh b/open-vm-tools/services/plugins/dndcp/stringxx/string.hh index ec60f5bfa..6424daa63 100644 --- a/open-vm-tools/services/plugins/dndcp/stringxx/string.hh +++ b/open-vm-tools/services/plugins/dndcp/stringxx/string.hh @@ -87,7 +87,7 @@ namespace utf { * to replace the std::string in our codebase. */ typedef std::string utf8string; -typedef std::basic_string utf16string; +typedef std::u16string utf16string; class VMSTRING_EXPORT string {