Skip to content

Conversation

@vmichal
Copy link
Contributor

@vmichal vmichal commented Jan 16, 2026

The newly failing libcxx test std\containers\container.adaptors\flat.multimap\robust_against_nonbool.compile.pass.cpp contains a template lambda written in such a way that template argument deduction fails unless it is called precisely with flat_map::const_reference

[]<class T>(std::pair<const StrictComparable<T>&, const StrictComparable<T>&>) -> BooleanTestable const& { return yes; };

Since the predicate given to flat_map::erase_if is specified to be callable with flat_map::const_reference in [flat.map.erasure]/2, I think the libcxx test is standards compliant.

Adjust the code of flat_map::erase_if to satisfy the test.

@vmichal vmichal requested a review from a team as a code owner January 16, 2026 03:23
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews Jan 16, 2026
@vmichal vmichal force-pushed the flat_map-erase_if-const_reference branch from 7e80fae to 18fbe96 Compare January 16, 2026 03:24
@StephanTLavavej StephanTLavavej added bug Something isn't working flat_meow C++23 container adaptors labels Jan 16, 2026
@github-project-automation github-project-automation bot moved this from Initial Review to Work In Progress in STL Code Reviews Jan 16, 2026
@StephanTLavavej StephanTLavavej moved this from Work In Progress to Initial Review in STL Code Reviews Jan 16, 2026
@StephanTLavavej StephanTLavavej self-assigned this Jan 16, 2026
@StephanTLavavej StephanTLavavej removed their assignment Jan 16, 2026
@StephanTLavavej StephanTLavavej moved this from Initial Review to Merging in STL Code Reviews Jan 16, 2026
@StephanTLavavej StephanTLavavej merged commit 9068390 into microsoft:feature/flat_map Jan 16, 2026
45 checks passed
@github-project-automation github-project-automation bot moved this from Merging to Done in STL Code Reviews Jan 16, 2026
@StephanTLavavej
Copy link
Member

Thanks for figuring out how to fix this! 😻

@vmichal vmichal deleted the flat_map-erase_if-const_reference branch January 16, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working flat_meow C++23 container adaptors

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants