8sa1-gcc/gcc/testsuite/g++.old-deja/g++.mike/pmf9.C
Jeff Law 921e5a0eb4 Initial revision
From-SVN: r14840
1997-08-19 01:34:40 -06:00

24 lines
221 B
C

class K {
public:
int f(int i) { return i; }
};
class Q {
public:
Q() { kp = new K; }
int g();
private:
K * kp;
};
int Q::g() {
return (kp->f)(42);
};
int main () {
Q q;
if (q.g() != 42)
return 1;
}