gcc/testsuite/g++.dg/concepts/explicit-spec1a.C
raw| 1 | // A version of explicit-spec1.C where the template g has trailing instead of |
| 2 | // template requirements. |
| 3 | // PR c++/107864 |
| 4 | // { dg-do compile { target concepts } } |
| 5 | |
| 6 | template<typename T> concept C = __is_class(T); |
| 7 | struct Y { int n; } y; |
| 8 | template<class T> void g(T) requires C<T> { } |
| 9 | int called; |
| 10 | template<> void g(Y) { called = 3; } |
| 11 | int main() { g(y); } |