OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.dg/] [inherit/] [ptrmem2.C] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
// 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
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.