Skip to content

inplace_iterator: Add enough iteration to support std::erase_if#8877

Merged
kripken merged 2 commits into
WebAssembly:mainfrom
kripken:inplace.iter
Jun 30, 2026
Merged

inplace_iterator: Add enough iteration to support std::erase_if#8877
kripken merged 2 commits into
WebAssembly:mainfrom
kripken:inplace.iter

Conversation

@kripken

@kripken kripken commented Jun 30, 2026

Copy link
Copy Markdown
Member

erase_if will be needed in a later PR.

@kripken kripken requested a review from a team as a code owner June 30, 2026 17:00
@kripken kripken requested review from tlively and removed request for a team June 30, 2026 17:00
} // namespace detail

template<typename Vector, typename Pred>
requires detail::is_inplace_vector_or_derived<Vector>::value

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we're still hiding use of requires behind ifdefs so jukka's old system compilers still work... but if we're not testing that on CI, maybe we shouldn't worry about that beyond letting him fix things up as necessary.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I see the lattice code has such ifdefs, but we have other requires without? E.g.

requires std::is_same_v<FallbackGenerator, DefaultTypeNameGenerator>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Landing, if there is an issue later I can fix it up.


} // namespace wasm

namespace std {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kind of weird that you have to provide a new overload of a std function to support custom containers, but it looks like this is the standard practice?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I don't know how else to do this. The compiler errors without these overloads.

@kripken kripken merged commit 7ec528c into WebAssembly:main Jun 30, 2026
16 checks passed
@kripken kripken deleted the inplace.iter branch June 30, 2026 18:52
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.

2 participants