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]/14 should reference [class.dtor]/3 #292

Closed
villevoutilainen opened this issue Apr 27, 2014 · 1 comment
Closed

[except.spec]/14 should reference [class.dtor]/3 #292

villevoutilainen opened this issue Apr 27, 2014 · 1 comment

Comments

@villevoutilainen
Copy link
Member

An innocent reading of [except.spec] would indicate that destructors that haven't been implicitly defaulted do not default to a noexcept-spec that is computed from the functions the destructor implicitly calls, but that is not so - [class.dtor]/3 says "A declaration of a destructor that does not have an exception-specification is implicitly considered to have the same exception-specification as an implicit declaration."

Suggested fix: add a note to [except.spec]/14 referencing [class.dtor]/3:

If f is an inheriting constructor or an implicitly declared default constructor, copy
constructor, move constructor, destructor [Note: this applies also to destructors
that are not implicitly declared, see [class.dtor]/3 --end note]
, copy assignment operator, or move assignment operator, its implicit exception-specification specifies the type-id T if
and only if T is allowed by the exception-specification of a function directly invoked
by f’s implicit definition;

@jensmaurer
Copy link
Member

[except.spec] got rewritten by P0003R5, and the issue described no longer exists, because the wording from [class.dtor] was integrated into [except.spec].

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

No branches or pull requests

2 participants