blob: 35f3bca40399f495ffa2c83efd872e1c4543e0d2 [file] [log] [blame]
// { 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;
}