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/] [pmf7.C] - Rev 377
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do run }
class A;
typedef int (A::*f_ptr) (void);
class B {
public:
B() {} ~B() {}
B& dummy(f_ptr cb) { return *this; }
};
template<class SP, class CB> SP& call_dummy(SP* sp, CB cb) {
sp->dummy(cb);
return *sp;
}
class A {
public:
A() {} ~A() {}
int ok() { return 0; }
A& call_it(B* s) {
call_dummy(s, &A::ok);
return *this;
}
};
int main() {
A a; B b;
a.call_it(&b);
return 0;
}
Go to most recent revision | Compare with Previous | Blame | View Log