22 Oct
2012
22 Oct
'12
3:50 p.m.
2012/10/22 Robert Jones
Can anyone tell me the correct incantation to get the 'Not OK' lines to work?
Thx, Rob.
#include
#include #include #include #include
+ #include
#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
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 ) );
}