Skip to content

b+tree: qualify the dependent-base members, so this builds on Linux too - #167

Merged
psiha merged 1 commit into
wip/devector-livefrom
fix/linux-dependent-base-qualification
Sep 11, 2026
Merged

b+tree: qualify the dependent-base members, so this builds on Linux too#167
psiha merged 1 commit into
wip/devector-livefrom
fix/linux-dependent-base-qualification

Conversation

@psiha

@psiha psiha commented Sep 11, 2026

Copy link
Copy Markdown
Owner

Against wip/devector-live (#160). Independent of the devector fault that branch
is about — this is purely that the branch does not compile on Linux, and nothing
on Windows says so.

What

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 are named
unqualified. Unqualified lookup does not consider dependent bases, so it is
ill-formed; clang-cl accepts it under MS compatibility, and clang++-22 + libc++
rejects all of them:

error: explicit qualification required to use member 'key_at' from dependent base class
error: use of undeclared identifier 'node_capacity'

60 errors across b+tree.hpp and b+tree/impl.hpp — 51 × key_at,
6 × shift_entries_left, 4 × node_capacity (plus 3 more in b+tree.hpp).

Qualified the way the rest of the tree already does: bptree_base:: for
node_capacity (the form #155 introduced it with — that PR writes
bptree_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, 0
errors
— 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-live is red for
this reason, not for the fault the branch is investigating.

🤖 Generated with Claude Code

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>
@psiha
psiha merged commit 31ae3cf into wip/devector-live Sep 11, 2026
0 of 10 checks passed
@psiha
psiha deleted the fix/linux-dependent-base-qualification branch September 11, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant