Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[except.spec] Clarify potentially-throwing functions #4563

Merged
merged 1 commit into from Apr 30, 2021

Conversation

jensmaurer
Copy link
Member

Expressions are potentially-throwing; functions have a
potentially-throwing exception specification.

Fixes #4561

@xmh0511
Copy link
Contributor

xmh0511 commented Mar 27, 2021

Maybe miss the constructor, destructor in other paragraphs, which has the same issue. [except.spec#7.1], [except.spec#8].
Change [except.spec#7.1] to

the invocation of a constructor selected by overload resolution in the implicit definition of the constructor for class X to initialize a potentially constructed subobject

Since the introduction is "any of the following constructs is potentially-throwing"; In order to be consistent with the following sub-bullets by using invocation to hint that it's an expression.

Change [except.spec#8] to

The exception specification for an implicitly-declared destructor, or a destructor without a noexcept-specifier, is potentially-throwing if and only if any of the destructors for any of its potentially constructed subobjects is potentially-throwing of a class type M has potentially-throwing exception specification or the destructor is virtual and the destructor of any virtual base class is potentially-throwing has potentially-throwing exception specification.

Expressions are potentially-throwing; functions have a
potentially-throwing exception specification.
@jensmaurer
Copy link
Member Author

Fixed.

@tkoeppe tkoeppe merged commit 7f77001 into cplusplus:master Apr 30, 2021
@jensmaurer jensmaurer deleted the c21 branch May 1, 2021 20:12
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.

Several issues about section [except.spec]
3 participants