fix: suppress char_traits<uint8_t> deprecation for Xcode 26+ / libc++ 16+#4
Open
pgarciagon wants to merge 1 commit intokoinos:masterfrom
Open
fix: suppress char_traits<uint8_t> deprecation for Xcode 26+ / libc++ 16+#4pgarciagon wants to merge 1 commit intokoinos:masterfrom
pgarciagon wants to merge 1 commit intokoinos:masterfrom
Conversation
std::basic_string<uint8_t> and std::basic_string_view<uint8_t> instantiate char_traits<unsigned char>, which libc++ 16+ marks as deprecated (error with -Werror on Xcode 26 / macOS Sequoia+). Add #pragma clang diagnostic to suppress the warning around the fizzy namespace typedefs. A long-term fix would replace bytes/bytes_view with std::span<uint8_t>, but that requires broader API changes. Fixes build on: Apple Clang 17+ (Xcode 26+), LLVM Clang 16+
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.
Problem
std::basic_string<uint8_t>andstd::basic_string_view<uint8_t>instantiatestd::char_traits<unsigned char>. Starting with LLVM libc++ 16 that specialisationis marked deprecated; in Xcode 26 (libc++ 26 beta) it is a hard error:
This blocks building any project that depends on fizzy via CMake/Hunter on
Apple Silicon Macs with Xcode 26.
Fix
Wrap the two type aliases in
bytes.hppwith#pragma clang diagnosticguardsthat suppress
-Wdeprecated-declarationslocally. No functional change; onlythe diagnostic suppression is added. Non-Clang compilers are unaffected.
Testing
Built and linked against koinos-chain on macOS 15 / Apple M-series / Xcode 16.3
(Xcode 26 beta). All existing tests pass.