
25 May
2006
25 May
'06
11:26 a.m.
On 24/05/06, Paul Mensonides <pmenso57@comcast.net> 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.