1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// { dg-do run { target c++17 } } // { dg-options "-fconcepts" } template<typename T> concept bool Class () { return __is_class(T); } struct Test { void f(auto a) requires Class<decltype(a)>(); } test; struct S { }s; int main() { test.f(s); } void Test::f(auto a) requires Class<decltype(a)>() { }