
24 May
2006
24 May
'06
12:59 p.m.
Paul Mensonides wrote:
So:
template<class P, class M, class C> inline typename closure<M C::*>::type operator->*( P p, M C::* member) { return make_closure( &*p, member ); }
It would work for iterators, too.
How would this affect generic code? A use of this operator would likely be dependent and therefore might only be found through the ADL in the second phase.
I tend to not use ->* in generic code anyway since (*p).* is much more likely to work. :-)