Boost logo

Boost :

From: Mac Murrett (mmurrett_at_[hidden])
Date: 2002-07-09 14:59:57


> I'm not sure it's worth it. The above is far less-efficient than some
> alternatives, both in speed and in code size. It seems like a high
> price to
> pay for a little syntax. Wouldn't a syntax like:
>
> invoke(target, pmf, arg1, arg2...)
>
> work reasonably well in place of:
>
> target->*pmf(arg1, arg2 ...)
>
> ?
>
> That approach wouldn't intrude on shared_ptr at all.

This won't solve the problem of:

struct C
{
     foo();
};

vector<shared_ptr<C> > v;
...
for_each(v.begin(), v.end(), mem_fun(&C::foo));

... or am I missing something?

Mac Murrett.


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