URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [net37.C] - Rev 414
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do run }
class B {
public:
int bi;
void bProc ( void ) { bi = 39; }
};
class D : public B {
public:
int di;
void dProc (void ){ di = 42; }
};
typedef void (B::*BPROC)(void);
typedef void (D::*DPROC)(void);
union AFX_PMSG {
public:
AFX_PMSG () {}
AFX_PMSG ( BPROC bpr ) { bfn = bpr ; }
operator BPROC() { return bfn; }
BPROC bfn;
DPROC dfn;
};
int main(int argc, char *argv[]) {
B b;
D d;
BPROC bpr = &B::bProc;
AFX_PMSG pmsg(bpr);
BPROC ppr = pmsg;
return 0;
}
Go to most recent revision | Compare with Previous | Blame | View Log