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