PR c++/86728 - C variadic generic lambda.
[official-gcc.git] / gcc / testsuite / g++.dg / concepts / class4.C
blob86eecbc457294e6ab2829179a92d02b6cada6705
1 // { dg-options "-std=c++17 -fconcepts" }
3 template<typename T>
4   concept bool Class() { return __is_class(T); }
6 template<typename T>
7   concept bool Union() { return __is_union(T); }
9 // Check non-overlapping specializations
10 template<typename T> struct S1 { static const int value = 0; };
11 template<Class T> struct S1<T> { static const int value = 1; };
12 template<Union T> struct S1<T> { static const int value = 2; };
14 struct S { };
15 union U { };
17 static_assert(S1<int>::value == 0, "");
18 static_assert(S1<S>::value == 1, "");
19 static_assert(S1<U>::value == 2, "");
21 int main() { }