gcc/testsuite/g++.dg/concepts/diagnostic20.C
raw| 1 | // PR c++/99214 |
| 2 | // { dg-do compile { target c++20 } } |
| 3 | |
| 4 | template <class T> |
| 5 | struct A { |
| 6 | template <class U> static void f() requires requires { T::fail; }; |
| 7 | }; |
| 8 | |
| 9 | int main() { |
| 10 | A<int>::f<char>(); // { dg-error "no match" } |
| 11 | } |
| 12 | |
| 13 | // { dg-message "In substitution of '\[^\r\n\]* \\\[with U = char\\\]'" "" { target *-*-* } 0 } |