| 1 |
// PR c++/49812 |
| 2 |
// The call should choose the second f because i++ is an int rvalue. |
| 3 |
|
| 4 |
template <class T> void f(const volatile T& t) { t.i; } |
| 5 |
template <class T> void f(const T&); |
| 6 |
|
| 7 |
int main() |
| 8 |
{ |
| 9 |
volatile int i = 0; |
| 10 |
f(i++); // { dg-warning "deprecated" "" { target c++2a } } |
| 11 |
} |