Created on 2012-10-15.00:00:00 last changed 94 months ago
[Moved to DR at the November, 2014 meeting.]
Proposed resolution (February, 2014):
This issue is resolved by the resolution of issue 1571.
The example just before the final bullet of 9.4.5 [dcl.init.list] paragraph 5 is incorrect. It reads, in part,
struct X { operator int&(); } x; int&& rri2 = X(); // error: lvalue-to-rvalue conversion applied to the // result of operator int&
In fact, according to 12.2.2.7 [over.match.ref] (as clarified by the proposed resolution of issue 1328, although the intent was arguably the same for the previous wording), X::operator int&() is not a candidate for the initialization of rri2, so the case falls into the last bullet, creating an int temporary.
It is not clear whether the lvalue-to-rvalue conversion whose prohibition is intended to be illustrated by that example could actually occur, given the specification of candidate functions in 12.2.2.7 [over.match.ref].
History | |||
---|---|---|---|
Date | User | Action | Args |
2017-02-06 00:00:00 | admin | set | status: drwp -> cd4 |
2015-05-25 00:00:00 | admin | set | status: dr -> drwp |
2015-04-13 00:00:00 | admin | set | messages: + msg5385 |
2014-11-24 00:00:00 | admin | set | status: ready -> dr |
2014-03-03 00:00:00 | admin | set | messages: + msg4835 |
2014-03-03 00:00:00 | admin | set | status: drafting -> ready |
2013-05-03 00:00:00 | admin | set | status: open -> drafting |
2012-10-15 00:00:00 | admin | create |