gcc/testsuite/g++.dg/concepts/auto8a.C
raw| 1 | // PR c++/110065 |
| 2 | // { dg-do compile { target c++17 } } |
| 3 | // { dg-additional-options -fconcepts } |
| 4 | |
| 5 | template <typename> |
| 6 | inline constexpr bool t = false; |
| 7 | |
| 8 | int |
| 9 | f () |
| 10 | { |
| 11 | return t<auto(&)(const int*) -> auto&>; // { dg-error "template argument" } |
| 12 | } |
| 13 | |
| 14 | void |
| 15 | g () |
| 16 | { |
| 17 | t<auto(&)(const int*) -> auto&>; // { dg-error "template argument" } |
| 18 | } |