Spell out Negentropy's template argument so Apple clang 16 can build - #266
Open
kojira wants to merge 1 commit into
Open
Spell out Negentropy's template argument so Apple clang 16 can build#266kojira wants to merge 1 commit into
kojira wants to merge 1 commit into
Conversation
`Negentropy ne(storage, ...)` relies on class template argument deduction through an alias template (`template<typename T> using Negentropy = negentropy::Negentropy<T>`). That is a C++20 feature (P1814) which Apple clang 16 -- the compiler shipped with the current Xcode Command Line Tools on macOS 15 -- does not implement, so the build fails with: src/apps/relay/RelayNegentropy.cpp:99:24: error: alias template 'Negentropy' requires template arguments; argument deduction only allowed for class templates The macOS CI job passes because `macos-latest` carries a newer clang (17) that supports alias-template CTAD. Anyone building on a stock macOS 15 install hits it. Name the argument explicitly at all five call sites: Negentropy<std::remove_reference_t<decltype(storage)>> ne(storage, ...); This is a no-op on compilers that already deduced it, and lets clang 16 build. Verified: pristine master fails on Apple clang 16.0.0 (x86_64, macOS 15.2); with this change it builds and runs there, and it still builds unchanged on Apple clang 17 (arm64). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01699ff9NNv1NUxH9nmh8mqd
kojira
force-pushed
the
fix/negentropy-ctad-clang16
branch
from
September 3, 2026 16:20
2115316 to
1e803b8
Compare
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.
Fixes #265.
Problem
Negentropy ne(storage, ...)deduces the template argument through an alias template:CTAD through an alias template is a C++20 feature (P1814). Apple clang 16 — the compiler shipped with the current Xcode Command Line Tools on macOS 15 — does not implement it, so a stock macOS build fails:
The
macos-latestCI runner carries a newer clang (17) that supports it, which is why the macOS workflow stays green while local builds on macOS 15 break.Fix
Name the argument explicitly at the five call sites (one in
RelayNegentropy.cpp, four incmd_sync.cpp):This is a no-op wherever deduction already worked, and needs no per-site knowledge of the storage type.
Verified
strfry 1.1.2-146-gc65da49runsThanks for the recent macOS work (#190, #210) — with those in, this was the only thing left standing between master and a clean build on a current stock macOS install.
🤖 Generated with Claude Code
https://claude.ai/code/session_01699ff9NNv1NUxH9nmh8mqd