Boost logo

Boost :

From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2006-05-24 07:57:32


> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] On Behalf Of Daniel James

> I once implemented something similar, but my version wasn't
> nearly as elegant as yours (and I suspect you wrote yours in
> a lot less time). So I'm feeling very churlish for pointing
> out that it doesn't deal with a couple of cases:

I'm not surprised that I missed something. Luckily we have a bunch of smart
people here.

> I've attached a quick attempt at getting them to work.
>
> With it, the implementation of operator->* becomes:
>
> template<class T, class M, class C> inline typename
> closure<T, M C::*>::type operator->*(
> const std::auto_ptr<T>& sp,
> M C::* member)
> {
> return make_closure(&*sp, member); }

Does it work?

Regards,
Paul Mensonides


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