PR c++/86728 - C variadic generic lambda.
[official-gcc.git] / gcc / testsuite / g++.dg / pr84492.C
blob1a2922096d19102c54e51b6775986e2a7fab71ae
1 // { dg-do compile }
2 // { dg-options "-fpermissive" }
4 template<int> int foo()
6   return ({ foo; }); // { dg-error "insufficient context" }
9 int bar()
11   return ({ foo; }); // { dg-error "insufficient context" }
14 void bar(int);
16 typedef void (*bart)(int);
18 bart barf()
20   return ({ bar; }); // { dg-error "insufficient context" }
23 bool bark()
25   return ({ barf; }); // ok, no overload
28 template <typename T>
29 class C
31   static int f();
32   bool g()
33   {
34     return ({ f; }); // ok, no overload
35   }
36   bool g(int)
37   {
38     return ({ g; }); // { dg-error "insufficient context" }
39   }