You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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;
The text was updated successfully, but these errors were encountered:
[except.spec] got rewritten by P0003R5, and the issue described no longer exists, because the wording from [class.dtor] was integrated into [except.spec].
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;
The text was updated successfully, but these errors were encountered: