In the documentation of Boost.MemberFunction it suggests that a useful purpose
for it would be to implement overloads of std algorithms, and indeed other similar
algorithms such that the final callable parameter could be a simple pointer to member.
struct X { bool method( ); };
std::vector<X> xs;
for_each( xs.begin( ), xs.end( ), & X::method );
or from Boost.Range
boost::for_each( xs, &X::method );
Is such a facility implemented anywhere in Boost?
Where I'm really going with this, is that I'd like to see versions of Boost.Range adaptors which
support the same facility, so I can say, for example
for_each( xs | filtered( & X::method ), doSomething );
rather than, as at present,
for_each ( xs | filtered( bind( & X::method, _1 ) ), doSomething );
and similarly for transformed.
Thanks,
- Rob.