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 f1(auto a)7void f1(auto a) requires Class<decltype(a)>() { } 8 9 // FIXME: This is generating excess errors related to pretty 10 // printing the trailing requires expression. f2(auto a)11void f2(auto a) 12 requires requires (decltype(a) x) { -x; } 13 { } 14 15 struct S { } s; 16 main()17int main() { 18 f1(0); // { dg-error "cannot call" } 19 f2((void*)0); // { dg-error "cannot call" } 20 } 21