- Title
- Incorrect example for rvalue reference binding via conversion function
- Status
- cd4
- Section
- 9.5.4 [dcl.init.ref]
- Submitter
- Michael Wong
Created on 2012-10-15.00:00:00 last changed 116 months ago
Messages
Date: 2014-11-15.00:00:00
[Moved to DR at the November, 2014 meeting.]
Date: 2014-02-15.00:00:00
Proposed resolution (February, 2014): This issue is resolved by the resolution of
issue 1571.
Date: 2012-10-15.00:00:00
The example just before the final bullet of 9.5.5 [dcl.init.list] paragraph 5
is incorrect. It reads, in part, 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].
struct X {
operator int&();
} x;
int&& rri2 = X(); // error: lvalue-to-rvalue conversion applied to the
// result of operator int&
| 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 | |