Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Y
- {
- public:
- void f();
- // ...
- };
- class X
- { // assume that you can overload .
- Y* p;
- Y& operator.() { return *p; }
- void f();
- // ...
- };
- void g(X& x)
- {
- x.f(); // X::f or Y::f or error?
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement