
7 Mar
2007
7 Mar
'07
6:58 p.m.
operator-> can be overloaded, but it behaves differently from all other operators.
struct A { void f(); }; struct B { A* operator->() const { return(p); } A* p; };
A a; C c = { &a }; c->f(); //calls a.f();
I can't think of any way to make it do what you want.
Right, I was thinking that something like: operator->(boost::function1<ReturnType, A* a>) { } would be a viable option. I know now that it wouldn't be.
In Christ, Steven Watanabe
-Jason