1 // { dg-options "-std=c++17 -fconcepts" } 2 3 template<typename T> Class()4 concept bool Class() { return __is_class(T); } 5 6 template<typename T> Union()7 concept bool Union() { return __is_union(T); } 8 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; }; 13 14 struct S { }; 15 union U { }; 16 17 static_assert(S1<int>::value == 0, ""); 18 static_assert(S1<S>::value == 1, ""); 19 static_assert(S1<U>::value == 2, ""); 20 21 int main() { } 22