| 1 |
// PR c++/52597 |
| 2 |
// { dg-require-effective-target c++11 } |
| 3 |
|
| 4 |
struct A { |
| 5 |
int zip(); |
| 6 |
|
| 7 |
decltype(zip) bar0; // { dg-error "invalid use of non-static member function" } |
| 8 |
void bar1() { |
| 9 |
typedef decltype(this->A::zip) x; // { dg-error "invalid use of non-static member function" } |
| 10 |
} |
| 11 |
void bar2() { |
| 12 |
typedef decltype(A::zip) x; // { dg-error "invalid use of non-static member function" } |
| 13 |
} |
| 14 |
}; |
| 15 |
|
| 16 |
typedef decltype(A().zip) x; // { dg-error "invalid use of non-static member function" } |
| 17 |
|
| 18 |
// { dg-prune-output "invalid type in declaration" } |