Created on 2011-04-15.00:00:00 last changed 130 months ago
[Voted into the WP at the February, 2012 meeting; moved to DR at the October, 2012 meeting.]
Proposed resolution (August, 2011):
Change the example in 12.2.4.3 [over.ics.rank] paragraph 3 bullet 1 sub-bullet 5 as follows:
template<class T> int f(T&); template<class T> int f(T&&);int f(void(&)()); // #1 int f(void(&&)()); // #2 void g(); int i1 = f(g); // callsf(T&)#1
The following example appears in 12.2.4.3 [over.ics.rank] paragraph 3:
template<class T> int f(T&);
template<class T> int f(T&&);
void g();
int i1 = f(g); // calls f(T&)
This is not correct. Because of the special deduction rule for rvalue reference parameters in 13.10.3.2 [temp.deduct.call] paragraph 3 and the reference-collapsing rules of 9.3.4.3 [dcl.ref] paragraph 6, the parameter type for both will be void(&)().
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-03-03 00:00:00 | admin | set | status: drwp -> cd3 |
2012-11-03 00:00:00 | admin | set | status: dr -> drwp |
2012-09-24 00:00:00 | admin | set | messages: + msg4012 |
2012-02-27 00:00:00 | admin | set | messages: + msg3829 |
2012-02-27 00:00:00 | admin | set | status: ready -> dr |
2011-04-15 00:00:00 | admin | create |