macOS build failure with libc++ 19#144
Merged
AndriiVoitenko merged 1 commit intomasterfrom Apr 14, 2026
Merged
Conversation
libMVRgdtf fails to build on macOS with Homebrew LLVM 19: error: implicit instantiation of undefined template 'std::char_traits<unsigned short>' On macOS, TXChar is UniChar (uint16_t), so StdUStr becomes std::basic_string<uint16_t>. libc++ 19 no longer provides std::char_traits for arbitrary types — only char, wchar_t, char8_t, char16_t, and char32_t. Linux is already fine (TXChar = char16_t). The fix is to do the same on macOS in GSString.h:55: // Before: typedef UniChar TXChar; // After: typedef char16_t TXChar; This is safe because: - The public API only exposes MvrString (const char*) — no type change visible to consumers - char16_t and uint16_t are the same width and representation - It actually fixes a latent UB in TXString::hash(), which already casts to std::u16string - CoreFoundation calls expecting UniChar* just need an explicit cast
ILane-VW
approved these changes
Apr 14, 2026
adragnevVW
approved these changes
Apr 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
libMVRgdtf fails to build on macOS with Homebrew LLVM 19:
error: implicit instantiation of undefined template 'std::char_traits'
On macOS, TXChar is UniChar (uint16_t), so StdUStr becomes std::basic_string<uint16_t>. libc++ 19 no longer provides std::char_traits for arbitrary types — only char, wchar_t, char8_t, char16_t, and char32_t.
Linux is already fine (TXChar = char16_t). The fix is to do the same on macOS in GSString.h:55:
// Before:
typedef UniChar TXChar;
// After:
typedef char16_t TXChar;
This is safe because: