
7 Mar
2007
7 Mar
'07
1:03 a.m.
AMDG Jason Turner <lefticus <at> gmail.com> writes:
Learn something new every day, I thought the -> operator could take parameters.
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. In Christ, Steven Watanabe