Boost logo

Boost :

From: Daniel James (daniel_james_at_[hidden])
Date: 2006-05-25 07:26:09


On 24/05/06, Paul Mensonides <pmenso57_at_[hidden]> wrote:

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

Well, it passes the tests I tried it with (the ones from your post and
a couple of others I quickly wrote). But it doesn't support the style
of calling suggested by Peter, because it requires the type of the
pointee. But that is only needed to tell if it's const or volatile -
which should be fairly easy to get from the pointer. I'll have a go at
doing that when I get the chance, which probably means this weekend.


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