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 November, 2010 meeting.]N3092 comment DE 11
It is unclear whether copy elision is permitted when returning a parameter of class type. If not, it should still be possible to move, rather than copy, the return value.
Suggested resolution: Amend paragraph 34 to explicitly exclude function parameters from copy elision. Amend paragraph 35 to include function parameters as eligible for move-construction.
Proposed resolution (September, 2010):
Change 126.96.36.199 [class.copy.ctor] paragraph 34 bullets 1 and 2 as follows:
in a return statement in a function with a class return type, when the expression is the name of a non-volatile automatic object with the same cv-unqualified type as the function return type, the copy/move operation can be omitted by constructing the automatic object directly into the function's return value
in a throw-expression, when the operand is the name of a non-volatile automatic object whose scope does not extend beyond the end of the innermost enclosing try-block (if there is one), the copy/move operation from the operand to the exception object (14.2 [except.throw]) can be omitted by constructing the automatic object directly into the exception object
Change 188.8.131.52 [class.copy.ctor] paragraph 35 as follows:
When the criteria for elision of a copy operation are met and the object to be copied is designated by an lvalue, overload resolution...[Drafting note: the change to paragraph 35 intentionally omits catch-clause parameters out of concern that a rethrow during the move would throw a stripped exception object. This should not be problematic in most cases, since exception objects are typically small.]