Hi All

Is it possible to write this code as a for_each/bind combination?

I know I could do this with Boost.Lambda or Boost.Phoenix, which is my
solution of last resort, but can it be done with plain Boost.Bind?

What I think I'm missing is a bindable sequence operator - is there any such thing?

Thanks, Rob

#include <vector>
#include <boost/bind.hpp>
#include <boost/range.hpp>

struct X { };

void do_this( const X & );
void do_that( const X & );

typedef std::vector<X> Xs;

int main( )
{
    Xs xs;

    for( Xs::const_iterator x = boost::begin(xs); x != boost::end(xs); ++x )
    {
        do_this( * x );
        do_that( * x );
    }
}