/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #include class CAndable : boost::andable< CAndable > { public: CAndable() {} CAndable& operator&=(CAndable const&) { return *this; } }; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #include #include #include #include #include #include struct FIdentity : std::unary_function< int, int > { int operator()(int n) const { return n; } }; void main() { CAndable x; int an[] = { 1, 2, 3 }; int* anEnd = an+3; std::copy( boost::make_filter_iterator( //boost::bind( FIdentity(), _1 )!=2, // does compile //boost::lambda::_1!=2, // error C3767: '&': candidate function(s) not accessible boost::phoenix::arg_names::_1!=2, // error C3767: '&': candidate function(s) not accessible an, anEnd ), boost::make_filter_iterator( //boost::bind( FIdentity(), _1 )!=2, // does compile //boost::lambda::_1!=2, // error C3767: '&': candidate function(s) not accessible boost::phoenix::arg_names::_1!=2, // error C3767: '&': candidate function(s) not accessible anEnd, anEnd ), std::ostream_iterator(std::cout, " ") ); std::cout << std::endl; }