4495766362
From-SVN: r23760
23 lines
221 B
C
23 lines
221 B
C
// prms-id: 4068
|
|
|
|
struct A {
|
|
A();
|
|
typedef void (A::*F)();
|
|
void d();
|
|
void foo() { }
|
|
F& f() { return f_; }
|
|
F f_;
|
|
};
|
|
|
|
A::A() : f_(&A::foo) {
|
|
}
|
|
|
|
void A::d() {
|
|
(this->*(f()))();
|
|
}
|
|
|
|
int main() {
|
|
A a;
|
|
a.d();
|
|
}
|