22 Mar
2005
22 Mar
'05
9:31 p.m.
Hello all : I have a filter_iterator question. I'm wondering if, conceptualy, I can construct an FI doing something like the following : typedef boost::filter_iterator< boost::bind( boost::mem_fn( &MyObject::HasQuality ), boost::ref( quality ) ), MyIterator > FilteredIterator; Instead of defining an explicit functor like this : struct MyFunctor { bool operator()( const MyObject& obj ) const { etc } }; and the FI like this : typedef boost::filter_iterator< MyFunctor, MyIterator > FilteredIterator; Gosh! Writing functors is flipping waste of time! Has anyone used the former construct instead? Thanks in advance! SGA