Skip to content

<flat_map>: drop bogus exception specifications#5460

Merged
StephanTLavavej merged 1 commit intomicrosoft:feature/flat_mapfrom
AlexGuteniev:flat_map_except
May 2, 2025
Merged

<flat_map>: drop bogus exception specifications#5460
StephanTLavavej merged 1 commit intomicrosoft:feature/flat_mapfrom
AlexGuteniev:flat_map_except

Conversation

@AlexGuteniev
Copy link
Contributor

Remove these exception specifications:

  • move-with-allocator constructor throws because allocator throws
  • ditto the extracted machinery _Extract_using_allocator
  • ditto copy assignment

Bugs introduced in #5454, before that there was only one of them, and it was in a constructor that was never called.

I'm not sure if move constructor and move assignment exception specifications are right. That's vector-like thing we have in flat_map, not necessarily vector, what if it might not have noexcept moves.

Remove these exception specifications:
* move-with-allocator constructor throws because allocator throws
* ditto the extracted machinery _Extract_using_allocator
* ditto copy assignment

Bugs introduced in microsoft#5454, before that there was only one of them,
 and it was in a constructor that was never called.
@AlexGuteniev AlexGuteniev requested a review from a team as a code owner May 2, 2025 05:39
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews May 2, 2025
@StephanTLavavej StephanTLavavej added bug Something isn't working flat_meow C++23 container adaptors labels May 2, 2025
@StephanTLavavej StephanTLavavej merged commit 3252573 into microsoft:feature/flat_map May 2, 2025
39 checks passed
@github-project-automation github-project-automation bot moved this from Initial Review to Done in STL Code Reviews May 2, 2025
@StephanTLavavej
Copy link
Member

Thanks for noticing and fixing this!

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

None yet

Development

Successfully merging this pull request may close these issues.

2 participants