2012/10/22 Robert Jones <robertgbjones@gmail.com>
Can anyone tell me the correct incantation to get the 'Not OK' lines to work?

Thx, Rob.

#include <boost/function.hpp>
#include <boost/phoenix/core.hpp>
#include <boost/phoenix/operator.hpp>
#include <boost/phoenix/bind/bind_member_variable.hpp>
#include <boost/phoenix/bind/bind_function.hpp>
 
+ #include <boost/phoenix/bind/bind_function_object.hpp>  

#include <boost/function.hpp> 
#include <list>

struct S { int i; };

void f( std::list<S> & l, int i )
{
    using boost::phoenix::arg_names::_1;
    using boost::phoenix::arg_names::_2;

    // OK
    l.remove_if( bind( & S::i, _1 ) >= i );

    // Not OK.
    boost::function<bool( int, int )> pred = _1 >= _2;
    l.remove_if( bind( pred, _1, i ) );

- l.remove_if( bind( pred, _1, i ) );
+ l.remove_if( bind( pred, bind( & S::i, _1 ), i ) );
 
}