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
If a parameter type (that is an object type) or the return type of a function has a deleted destructor, the function definition or the return statement is ill-formed respectively (the latter case is banned via CWG 2426). So should we just say "the destructor of X is trivial"?
The text was updated successfully, but these errors were encountered:
We don't ban function definitions where an involved object has a deleted destructor, we just ban passing arguments in an actual call (because we specify destruction of the parameter objects) and we ban return statements for objects with a deleted destructor. If a function doesn't have a return statement (maybe because it contains an endless loop) or if we never call the function, it seems we're fine. The provision in [class.temporary]p3 might be needed when compiling the function definition, though.
Editorial meeting 2021-04-16: You can define a function with a return type with a deleted destructor, if that function never returns.
Suggestion: Drop "or deleted" for the destructor. @tkoeppe to send e-mail to the CWG reflector.
If a parameter type (that is an object type) or the return type of a function has a deleted destructor, the function definition or the return statement is ill-formed respectively (the latter case is banned via CWG 2426). So should we just say "the destructor of X is trivial"?
The text was updated successfully, but these errors were encountered: