PR c++/86728 - C variadic generic lambda.
[official-gcc.git] / gcc / testsuite / g++.dg / template / operator11.C
blob8d6b77ab4541849a5e682e08a39d22b378373d4e
1 // PR c++/48594
2 // Test for uses of (X->*Y)() that don't actually involve a
3 // pointer to member function.
5 struct A { } a;
6 struct B { } b;
7 struct C * cp;
9 struct Func { void operator()(); };
10 Func operator->* (A, int);
12 typedef void (*pfn)();
13 pfn operator->* (B, int);
15 pfn C::*cpfn;
16 Func C::*cfunc;
18 template <class T>
19 void f()
21   (a->*1)();
22   (b->*1)();
23   (cp->*cpfn)();
24   (cp->*cfunc)();