| 1 |
// PR c++/69139 |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
|
| 4 |
auto get(int) -> int { return {}; } |
| 5 |
template <class R> int f(auto (*)(int) -> R) { return {}; } |
| 6 |
int i = f(get); |
| 7 |
|
| 8 |
int foo1 (auto (int) -> char); |
| 9 |
|
| 10 |
int foo2 (auto f(int) -> char); |
| 11 |
|
| 12 |
int foo2 (auto (f)(int) -> char); |
| 13 |
|
| 14 |
int foo3 (auto (*f)(int) -> char); |
| 15 |
|
| 16 |
int foo4 (auto (*const **&f)(int) -> char); |
| 17 |
|
| 18 |
int foo5 (auto (*const **&f)(int, int *) -> char); |
| 19 |
|
| 20 |
int foo6 (auto (int) const -> char); // { dg-error "const" } |
| 21 |
|
| 22 |
void foo7 (auto __attribute__ ((unused)) f (int) -> int) { } |