Skip to content

Qualify erase calls to avoid ambiguity with C++20 std::erase - #240

Merged
netheril96 merged 1 commit into
netheril96:masterfrom
daeho-ro:fix-cxx20-erase-ambiguity
Nov 29, 2026
Merged

netheril96 merged 1 commit into
netheril96:masterfrom
daeho-ro:fix-cxx20-erase-ambiguity

Conversation

@daeho-ro

Copy link
Copy Markdown
Contributor

Fixes #236.

With -std=c++20, the unqualified erase(vector, index) calls in btree_dir.cpp also find std::erase via ADL and become ambiguous. Qualifying them as securefs::erase fixes the build (needed e.g. with tclap 1.6, which requires C++20).

@netheril96
netheril96 merged commit 9a601db into netheril96:master Nov 29, 2026
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.

Build error: btree_dir.cpp: error: call of overloaded 'erase(std::vector<securefs::DirEntry>&, ptrdiff_t&)' is ambiguous

2 participants