concept bool C() { return __is_class(T); }
// { dg-do compile { target c++14 } } template<typename T> constexpr bool Class = __is_class(T); template<typename T> constexpr bool Test = Class<T>; struct S { }; static_assert(!Test<int>, ""); static_assert(Test<S>, "");
concept bool Class_type() { return __is_class(T); }
// { dg-options "-std=c++17 -fconcepts" } template<typename T> concept bool C1 = __is_class(T); template<typename T> concept bool C2() { return __is_class(T); } template<typename T> constexpr bool C3 = __is_class(T); template<typename U> requires C1<U>() // { dg-error "" } void f1(U) { } template<typename U> requires C2<U> // { dg-error "invalid reference" } void f2(U) { } template<C3 T> // { dg-error "not a type" } void f(T) { } // { dg-error "" }