For some strange reason, I need to call the operator->() method directly. For example:
class A {
public:
void foo() { printf("Foo"); }
};
class ARef {
public:
A* operator->() { return a; }
protected:
A* a;
};
If I have an ARef object, I can call foo() by writing:
aref->foo();
However, I want to get the pointer to the protected member 'a'. How can I do this?