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
The evaluation of a full-expression can include the
evaluation of subexpressions that are not lexically part of the
full-expression. For example, subexpressions involved in evaluating
default arguments\iref{dcl.fct.default} are considered to
be created in the expression that calls the function, not the expression
that defines the default argument.
\end{note}
Intent
I think the intent is pretty clear in light of the subexpression wording and corresponding examples that the lifetime of a temporary should be solely be determined by the corresponding full-expression of the temporary materialization conversion subexpression that initialized it. Any "lexical" relationship is incidental.
Suggested wording
I think the [class.temporary] wording can be expressed purely with subexpressions, like so:
At the end of a full-expression temporaries that are initialized by temporary materialization conversion [conv.rval] subexpressions are destroyed.
The text was updated successfully, but these errors were encountered:
It seems that we should cover both subexpressions and constituent expressions.
Is it clear enough to say the following?
Temporary objects are destroyed as the last step in evaluating the full-expression ([intro.execution]) that (lexically) contains the point where they were createdof the temporary materialization conversions ([conv.rval]) that initialized the temporary objects.
It seems that we should cover both subexpressions and constituent expressions.
You are probably right
Is it clear enough to say the following?
Temporary objects are destroyed as the last step in evaluating the full-expression ([intro.execution]) that (lexically) contains the point where they were createdof the temporary materialization conversions ([conv.rval]) that initialized the temporary objects.
What's a "full-expression of "? I guess it's meant to be the inverse relationship of "subexpression or constituent expression of ", but I don't think it's defined anywhere. I think your proposed wording would be clear if "full-expression of" also gets defined elsewhere.
Alternatively the following wording could be used.
As the last step in evaluating a full-expression the temporaries that are initialized [conv.rval] in subexpressions or constituent expressions of the full-expression are destroyed.
Current wording
draft/source/basic.tex
Lines 4379 to 4383 in 16c8ce5
As far as I know "(lexically) contained" is not defined.
The presence of "lexically" here is especially confusing in the light of this note:
draft/source/basic.tex
Lines 5824 to 5831 in 16c8ce5
Intent
I think the intent is pretty clear in light of the subexpression wording and corresponding examples that the lifetime of a temporary should be solely be determined by the corresponding full-expression of the temporary materialization conversion subexpression that initialized it. Any "lexical" relationship is incidental.
Suggested wording
I think the [class.temporary] wording can be expressed purely with subexpressions, like so:
The text was updated successfully, but these errors were encountered: