Why can operator-> be overloaded manually?
- by FredOverflow
Wouldn't it make sense if p->m was just syntactic sugar for (*p).m? Essentially, every operator-> that I have ever written could have been implemented as follows:
Foo::Foo* operator->()
{
return &**this;
}
Is there any case where I would want p->m to mean something else than (*p).m?