gcc/testsuite/g++.dg/overload/pmf2.C
raw| 1 | // PR c++/561 |
| 2 | |
| 3 | class A { }; |
| 4 | |
| 5 | struct B : public A |
| 6 | { |
| 7 | void foo (); |
| 8 | void foo (int); |
| 9 | template <class T> |
| 10 | void bar (T); |
| 11 | template <class T> |
| 12 | void bar (T, T); |
| 13 | }; |
| 14 | |
| 15 | int main () |
| 16 | { |
| 17 | void (A::*f1)() = (void (A::*)()) &B::foo; |
| 18 | void (A::*f2)(int) = (void (A::*)(int)) &B::bar; |
| 19 | void (A::*f3)(int) = (void (A::*)(int)) &B::bar<int>; |
| 20 | } |