1 // { dg-do compile { target c++17 } } 2 // { dg-options "-fconcepts" } 3 4 template<typename T> Class()5 concept bool Class() { return __is_class(T); } 6 7 template<typename T> Union()8 concept bool Union() { return __is_union(T); } 9 10 // Check non-overlapping specializations 11 template<typename T> struct S1 { static const int value = 0; }; 12 template<Class T> struct S1<T> { static const int value = 1; }; 13 template<Union T> struct S1<T> { static const int value = 2; }; 14 15 struct S { }; 16 union U { }; 17 18 static_assert(S1<int>::value == 0, ""); 19 static_assert(S1<S>::value == 1, ""); 20 static_assert(S1<U>::value == 2, ""); 21 22 int main() { } 23