Skip to content

Correct overly-strengthened noexcept-specifier for basic_string_view constructor - #1510

Merged
Stephan T. Lavavej (StephanTLavavej) merged 1 commit into
microsoft:masterfrom
CaseyCarter:noexcept-fix
Dec 2, 2020
Merged

Correct overly-strengthened noexcept-specifier for basic_string_view constructor#1510
Stephan T. Lavavej (StephanTLavavej) merged 1 commit into
microsoft:masterfrom
CaseyCarter:noexcept-fix

Conversation

@CaseyCarter

Copy link
Copy Markdown
Contributor

IIRC this noexcept-specifier was originally (incorrectly) noexcept(to_address(_First)) in the Standard, which was "corrected" both here and in an LWG issue to noexcept(true) since to_address never throws. WG21 noticed that we'd been ignoring all along that the difference operation in the size calculation could throw and fixed the Standard by removing the noexcept-specifier completely, but for whatever reason I dropped the ball on fixing our strengthening appropriately until last week when I noticed this while experimentally implementing WG21-P1989.

@CaseyCarter Casey Carter (CaseyCarter) added the bug Something isn't working label Dec 2, 2020
@CaseyCarter
Casey Carter (CaseyCarter) requested a review from a team as a code owner December 2, 2020 02:05
@StephanTLavavej

Copy link
Copy Markdown
Member

Thanks for making the STL stronger by ever-so-slightly weakening this exception specification! 😹

@CaseyCarter
Casey Carter (CaseyCarter) deleted the noexcept-fix branch December 3, 2020 00:11
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.

3 participants