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
Add cross-references between [basic.life], #6058
Conversation
[class.cdtor] and [except.handle]. To resolve confusion noted in cplusplus/CWG#204
Now that pseudo-destructors also end the lifetime of scalar objects, is there a latent Core issue lurking here? |
I don't feel there is. A scalar pseudo-destructor is necessarily trivial, so [class.cdtor] isn't needed, and [basic.life] is written in terms of destruction of the object, which is what a pseudo-destructor does https://eel.is/c++draft/expr.call#5.sentence-2 . Am I missing something? |
These references may be helpful. @jensmaurer do you think there could be a more concise way of placing those references? |
\begin{note} | ||
For an object with a non-trivial constructor or destructor, see also~\ref{class.cdtor}. | ||
\end{note} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have this cross-reference in line 3425:
For an object under construction or destruction, see~\ref{class.cdtor}.
In general, [class.cdtor] describes behavior for objects under construction or destruction, and [basic.life] describes behavior for objects that are (entirely) out-of-lifetime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And yes, "object" might be a subobject.
\begin{note} | ||
For an object with a non-trivial constructor or destructor, see also~\ref{class.cdtor}. | ||
\end{note} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, see line 3492.
@tkoeppe, I'm not happy about the verbose notes, and I'm not sure they clarify anything. If there is some problem with the wording (e.g. because [class.cdtor] wants to be in [basic.life]), we should entertain that as a CWG issue with a specific suggestion for a change. |
@ecatmur Could you please file a CWG issue if there is a need for clarification? |
[class.cdtor] and [except.handle].
To resolve confusion noted in
cplusplus/CWG#204