Created on 2004-04-09.00:00:00 last changed 90 months ago
[Voted into the WP at the February, 2012 meeting; moved to DR at the October, 2012 meeting.]
Proposed Resolution (November, 2006):
Add the indicated wording to 7.6.20 [expr.comma] paragraph 1:
... The type and value of the result are the type and value of the right operand; the result is of the same value category as its right operand, and is a bit-field if its right operand is a glvalue and a bit-field.
Notes from the April, 2005 meeting:
The CWG suggested a different approach from the 10/2004 resolution, leaving 6.7.7 [class.temporary] unchanged and adding normative wording to 7.6.20 [expr.comma] specifying that, if the result of the second operand is a temporary, that temporary is the result of the comma expression as well.
Proposed resolution (October, 2004):
Change 6.7.7 [class.temporary] paragraph 2 as indicated:
... In all these cases, the temporaries created during the evaluation of the expression initializing the reference, except the temporary to which the reference is bound, are destroyed at the end of the full-expression in which they are created and in the reverse order of the completion of their construction...
Notes from the March 2004 meeting:
We think the temporary should be extended.
Split off from issue 86.
Should binding a reference to the result of a "," operation whose second operand is a temporary extend the lifetime of the temporary?
const SFileName &C = ( f(), SFileName("abc") );
|2014-03-03 00:00:00||admin||set||status: drwp -> cd3|
|2012-11-03 00:00:00||admin||set||status: dr -> drwp|
|2012-02-27 00:00:00||admin||set||messages: + msg3825|
|2012-02-27 00:00:00||admin||set||status: ready -> dr|
|2011-09-06 00:00:00||admin||set||status: review -> ready|
|2008-02-03 00:00:00||admin||set||messages: + msg1564|
|2008-02-03 00:00:00||admin||set||status: drafting -> review|
|2005-05-01 00:00:00||admin||set||messages: + msg1162|
|2005-05-01 00:00:00||admin||set||status: review -> drafting|
|2004-11-07 00:00:00||admin||set||messages: + msg1063|
|2004-11-07 00:00:00||admin||set||status: open -> review|
|2004-04-09 00:00:00||admin||set||messages: + msg992|