This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 112e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
[Voted into the WP at the July, 2017 meeting as document P0727R0.]
The Standard is insufficiently precise in dealing with temporaries. It is not always clear when the term “temporary” is referring to an expression whose result is a prvalue and when it is referring to a temporary object.
(See also issue 1568.)
Proposed resolution (February, 2014) [SUPERSEDED]:
The resolution is contained in document N3918.
This resolution also resolves issues 1651 and 1893.
Additional note, November, 2014:
Concerns have been raised that the meaning of “corresponding temporary object” is not clear enough in the proposed wording. In addition, N3918 says that it resolves issue 1300, but that issue is 1) marked as a duplicate of issue 914 and 2) the subject of continuing deliberations in EWG. This issue is being returned to "review" status to allow CWG to address these concerns.
Proposed resolution (March, 2017):
Change Clause 7 [expr] paragraph 12 as follows:
...is applied. [Note: If the expression is an lvalue of class type, it must have a volatile copy constructor to initialize the temporary that is the result object of the lvalue-to-rvalue conversion. —end note] The glvalue expression...
Change 6.7.7 [class.temporary] paragraph 6 as follows:
The third context is when a reference is bound to a temporary .116 The temporary to which the reference is bound or the temporary that is the complete object of a subobject to which the reference is bound persists for the lifetime of the reference
A temporary object bound to a reference parameter...
Change 184.108.40.206 [over.match.copy] bullet 1.2 as follows:
When the type of the initializer expression is a class type “cv S”, the non-explicit conversion functions of S and its base classes are considered. When initializing a temporary to be bound to the first parameter of a constructor...
Change 220.127.116.11 [res.on.arguments] bullet 1.3 as follows:
...[Note: If a program casts an lvalue to an xvalue while passing that lvalue to a library function (e.g. by calling the function with the argument std::move(x)), the program is effectively asking that function to treat that lvalue as a temporary . The implementation is free...
Change 18.104.22.168.4 [util.smartptr.weak.assign] paragraph 2 as follows:
Remarks: The implementation may meet the effects (and the implied guarantees) via different means, without creating a temporary .
Change the footnote in 22.214.171.124 [template.valarray.overview] paragraph 1 as follows:
...generalized subscript operators. [Footnote: The intent is to specify an array template that hass the minimum functionality necessary to address aliasing ambiguities and the proliferation of
temporaries. Thus... —end footnote]
Change the last bullet of C.6.16 [diff.cpp03.input.output] as follows:
initializing a const bool & which would bind to a temporary .
This resolution also resolves issues 943 and 1076.