repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
No empty .Rs/.Re
[netbsd-mini2440.git]
/
gnu
/
dist
/
gcc4
/
gcc
/
testsuite
/
g++.dg
/
inherit
/
ptrmem2.C
blob
a13705576a429bd5b693735aca4f622cd3f923d0
1
// PR c++/16810
2
3
struct C {
4
virtual void f() {}
5
};
6
7
struct B {virtual ~B() {} };
8
9
class D : public B, public C
10
{
11
public:
12
virtual void f() {}
13
};
14
15
typedef void ( C::*FP)();
16
typedef void ( D::*D_f)();
17
18
int main() {
19
D *d = new D();
20
C *c = d;
21
22
const FP fptr = (FP) &D::f;;
23
(d->* (D_f)fptr)();
24
}
25