
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] 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