blob: 3876527067e2beaedd899969db004b2379e9aeee [file] [log] [blame]
Chris Lattner313b84b2004-03-09 00:55:58 +00001struct A {
2 virtual void Method() = 0;
3};
4
5struct B : public A {
6 virtual void Method() { }
7};
8
9typedef void (A::*fn_type_a)(void);
10typedef void (B::*fn_type_b)(void);
11
12int main(int argc, char **argv)
13{
14 fn_type_a f = reinterpret_cast<fn_type_a>(&B::Method);
15 fn_type_b g = reinterpret_cast<fn_type_b>(f);
16 B b;
17 (b.*g)();
18 return 0;
19}