- Title
- Incorrect example in overload resolution
- Status
- cd3
- Section
- 12.2.4.3 [over.ics.rank]
- Submitter
- Nikolay Ivchenkov
Created on 2011-04-15.00:00:00 last changed 152 months ago
Messages
Date: 2012-02-15.00:00:00
[Voted into the WP at the February, 2012 meeting;
moved to DR at the October, 2012 meeting.]
Date: 2011-08-15.00:00:00
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); // calls f(T&) #1
Date: 2026-07-25.21:52:10
The following example appears in 12.2.4.3 [over.ics.rank] paragraph 3:
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(&)() .
template<class T> int f(T&);
template<class T> int f(T&&);
void g();
int i1 = f(g); // calls f(T&)
| 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 | |