1 // { dg-do compile { target c++17 } } 2 // { dg-options "-fconcepts" } 3 4 template<typename T> C()5 concept bool C() { return __is_class(T); } 6 7 template<typename T> D()8 concept bool D() { return C<T>() && __is_empty(T); } 9 10 struct X { }; 11 struct Y { int n; }; 12 g(T)13template<typename T> void g(T) { } // #1 g(T)14template<C T> void g(T) { } // #2 g(T)15template<D T> void g(T) { } // #3 16 17 // FIXME: How do I test that these generate the right symbols? 18 template void g(int); // Instantiate #1 19 template void g(X); // Instantitae #3 20 template void g(Y); // Instantiate #2 21 main()22int main() { } 23