Skip to content

<barrier>: Fix constructor's exception specification - #5398

Merged
Stephan T. Lavavej (StephanTLavavej) merged 1 commit into
microsoft:mainfrom
JMazurkiewicz:thread/barrier-ctor
Apr 22, 2025
Merged

<barrier>: Fix constructor's exception specification#5398
Stephan T. Lavavej (StephanTLavavej) merged 1 commit into
microsoft:mainfrom
JMazurkiewicz:thread/barrier-ctor

Conversation

@JMazurkiewicz

Copy link
Copy Markdown
Contributor

Currently, barrier's constructor is unconditionally noexcept, but according to [thread.barrier.class]/11 this is incorrect. This PR fixes the problem by changing exception specification from noexcept(true) to noexcept(is_nothrow_move_constructible_v<_Completion_function>).

@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) moved this from Initial Review to Ready To Merge in STL Code Reviews Apr 14, 2025
@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) moved this from Ready To Merge to Merging in STL Code Reviews Apr 22, 2025
@StephanTLavavej

Copy link
Copy Markdown
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej
Stephan T. Lavavej (StephanTLavavej) merged commit 056a3b4 into microsoft:main Apr 22, 2025
@github-project-automation github-project-automation Bot moved this from Merging to Done in STL Code Reviews Apr 22, 2025
@StephanTLavavej

Copy link
Copy Markdown
Member

Thanks for noticing and fixing this bug! 🐞 🕵️ 🛠️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants