Boost logo

Boost Users :

From: David Walthall (walthall_at_[hidden])
Date: 2006-12-22 12:53:56


gast128 wrote:
> Dear all,
>
> I just typed something like this:
>
>
> void Foo(void (I::*pmf)())
> {
> boost::shared_ptr<I> ptr(new I);
> (ptr->*pmf)();
> }
>
> but this does not compile. Is there are rationale behind this? I have no
> experience in ovelroading operator->*, so maybe this question arises from
> ignorance.

It appears that operator->* is not overloaded for shared_ptr. You can
achieve the same thing by doing:

     ((*ptr).*pmf)();

David


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net