Merged
Conversation
See https://libcxx.llvm.org/ReleaseNotes/19.html#deprecations-and-removals: > The base template for std::char_traits has been removed in LLVM 19. If > you are using std::char_traits with types other than char, wchar_t, > char8_t, char16_t, char32_t or a custom character type for which you > specialized std::char_traits, your code will stop working. The Standard > does not mandate that a base template is provided, and such a base > template is bound to be incorrect for some types, which could currently > cause unexpected behavior while going undetected.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #76 +/- ##
==========================================
- Coverage 74.07% 73.94% -0.13%
==========================================
Files 7 7
Lines 1192 1190 -2
Branches 169 169
==========================================
- Hits 883 880 -3
- Misses 309 310 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This was referenced Apr 10, 2025
Merged
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.
See https://libcxx.llvm.org/ReleaseNotes/19.html#deprecations-and-removals:
Then
exml/c_src/exml.cpp
Line 20 in 3f63a63
using ustring = std::basic_string<unsigned char>;That unsigned char is not a valid char_traits and will fail to compile. C++20 came up with a new type called char8_t which is undefined behaviour to cast to unsigned char because "dealing with UTF8 encoding safely is hard", so it broke backwards compatibility.
But OTP uses unsigned char for everything binaries, and it is undefined behaviour to convert from one to the other in C++.
Hence
exmlbreaks under LLVM 19, that is, XCode 16.3, that is, the update apple release this week.This PR fixes it by simply using a vector of
unsigned chars instead of thebasic_string. Theoretically the basic string is a lighter-weight abstraction but I doubt the compiler wouldn't know how to optimise that.This PR also removes some unused variables.