| 1 |
// PR c++/79504 |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
|
| 4 |
struct A |
| 5 |
{ |
| 6 |
void f () & {} |
| 7 |
|
| 8 |
template <typename ...Args> |
| 9 |
auto f (Args &&... args) && -> decltype (this->f (args...)) |
| 10 |
{ |
| 11 |
return this->f (args...); |
| 12 |
} |
| 13 |
}; |
| 14 |
|
| 15 |
int main (){ |
| 16 |
A p; |
| 17 |
p.f (); |
| 18 |
A{}.f(); |
| 19 |
} |