Boost logo

Boost :

From: Jason Turner (lefticus_at_[hidden])
Date: 2007-03-07 13:58:21


>
> 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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk