From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2002-07-08 18:23:05
> > I'm sure other boosters can do better than this by fiddling with type
> > etc.. This is just an example of how it *can* be done.
> Yes, I'd assume that bind() already covers all the above code so that:
> template <class U>
> [something] operator->*(U ptr)
> return bind(ptr, m_obj);
> should be enough, once you find a fast way to propagate the return value
> (maybe using some bind implementation details?)
> Giovanni Bajo
I don't know what 'bind' does exactly, but the mechanism would have to handle
the regular pointer-to-data-member case also. Overloading won't work, because a
general T::* would catch everything--including the pointers-to-member-functions.
The sample that I sent hijacks that with a specialized closure for that purpose
only. That was the purpose of the closure<U>::return_type typedef.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk