b+tree: qualify the dependent-base members, so this builds on Linux too - #167
Merged
Merged
Conversation
key_at, shift_entries_left and node_capacity are members of bptree_base,
which is a dependent base of the class templates calling them, and they
were being named unqualified. Unqualified lookup does not consider
dependent bases, so this is ill-formed - clang-cl accepts it under MS
compatibility, and clang with libc++ rejects every one of them:
error: explicit qualification required to use member 'key_at'
from dependent base class
error: use of undeclared identifier 'node_capacity'
which is 60 errors across b+tree.hpp and b+tree/impl.hpp, i.e. the
branch does not compile on Linux at all and nothing on Windows says so.
Qualified the way the rest of the tree already does it: bptree_base::
for node_capacity (the form #155 introduced it with), base:: and
impl_base:: for the two functions, per the alias in scope.
No behaviour change - every name resolves to what it already resolved to
on the toolchain that accepted it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Against
wip/devector-live(#160). Independent of the devector fault that branchis about — this is purely that the branch does not compile on Linux, and nothing
on Windows says so.
What
key_at,shift_entries_leftandnode_capacityare members ofbptree_base,which is a dependent base of the class templates calling them, and they are named
unqualified. Unqualified lookup does not consider dependent bases, so it is
ill-formed;
clang-claccepts it under MS compatibility, andclang++-22+ libc++rejects all of them:
60 errors across
b+tree.hppandb+tree/impl.hpp— 51 ×key_at,6 ×
shift_entries_left, 4 ×node_capacity(plus 3 more inb+tree.hpp).Qualified the way the rest of the tree already does:
bptree_base::fornode_capacity(the form #155 introduced it with — that PR writesbptree_base::node_capacity<decltype( node )>, and this lineage dropped it),and
base::/impl_base::for the two functions per the alias in scope.No behaviour change: every name resolves to what it already resolved to on the
toolchain that accepted it. 39 insertions, 39 deletions, all one-line
requalifications.
Verified
Linux,
clang++-22+ libc++, Ninja Release: configure EXIT=0, build EXIT=0, 0errors — against 60 before.
Note
I found this while trying to gate work on that branch on a Linux box. Worth knowing
independently of this PR: any Linux or CI lane on
wip/devector-liveis red forthis reason, not for the fault the branch is investigating.
🤖 Generated with Claude Code