This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-11-11
[Moved to DR at the May, 2015 meeting.]
11.4.5.3 [class.copy.ctor] paragraph 31 uses the phrase, “same cv-unqualified type,” twice. This is ambiguous, potentially either requiring that the types not be cv-qualified or meaning that cv-qualification should be ignored. The latter meaning is intended and the phrase should be replaced accordingly.
Proposed resolution (November, 2014):
Change 11.4.5.3 [class.copy.ctor] paragraph 31 as follows:
...This elision of copy/move operations, called copy elision, is permitted in the following circumstances (which may be combined to eliminate multiple copies):
in a return statement in a function with a class return type, when the
expressionexpression is the name of a non-volatile automatic object (other than a functionor catch-clauseparameter or a variable introduced by the exception-declaration of a handler (14.4 [except.handle])) with the samecv-unqualifiedtype (ignoring cv-qualification) as the function return type, the copy/move operation can be omitted by constructing the automatic object directly into the function's return valuein a throw-expression...
when a temporary class object that has not been bound to a reference (6.7.7 [class.temporary]) would be copied/moved to a class object with the same
cv-unqualifiedtype (ignoring cv-qualification), the copy/move operation can be omitted by constructing the temporary object directly into the target of the omitted copy/movewhen the exception-declaration...