| 1 |
// PR c++/95820 |
| 2 |
// { dg-do compile { target c++14 } } |
| 3 |
|
| 4 |
auto (*a)() -> bool = nullptr; |
| 5 |
int (*b)() -> bool = nullptr; // { dg-error "function with trailing return type" } |
| 6 |
int (**c)() -> bool = nullptr; // { dg-error "function with trailing return type" } |
| 7 |
int (&d)() -> bool = nullptr; // { dg-error "function with trailing return type" } |
| 8 |
int (*&e)() -> bool = nullptr; // { dg-error "function with trailing return type" } |
| 9 |
int (f[])() -> bool = nullptr; // { dg-error "function with trailing return type" } |
| 10 |
auto* (*g)() -> bool = nullptr; // { dg-error "function with trailing return type" } |
| 11 |
decltype(auto) (*h)() -> bool = nullptr; // { dg-error "invalid use" } |
| 12 |
decltype(auto)* (*i)() -> bool = nullptr; // { dg-error "function with trailing return type" } |
| 13 |
decltype(auto)& (*j)() -> bool = nullptr; // { dg-error "function with trailing return type" } |