PR c++/86728 - C variadic generic lambda.
[official-gcc.git] / gcc / testsuite / g++.dg / concepts / req2.C
blob3f35ee8f0f5f6f637ce11c2961fccb099228fe9e
1 // { dg-options "-std=c++17 -fconcepts" }
3 template<typename T>
4   concept bool Class () { return __is_class(T); }
6 void f1(auto a) requires Class<decltype(a)>() { }
8 // FIXME: This is generating excess errors related to pretty
9 // printing the trailing requires expression.
10 void f2(auto a)
11   requires requires (decltype(a) x) { -x; }
12 { }
14 struct S { } s;
16 int main() {
17   f1(0); // { dg-error "cannot call" }
18   f2((void*)0); // { dg-error "cannot call" }