On Tue, Mar 13, 2012 at 3:26 PM, Ovanes Markarian
On Tue, Mar 13, 2012 at 4:16 PM, Robert Jones
wrote: On Tue, Mar 13, 2012 at 3:05 PM, Ovanes Markarian
wrote:
What about Boost.Foreach??? http://www.boost.org/doc/libs/1_49_0/doc/html/foreach.html
I can see how that addresses the 'for_each' examples, though it sidesteps a bit, but not the filtered and transformed issues, which is the real deal for me.
Thx, R.
Boost offers filter and transform iterators, which can be put into the range ;)
http://www.boost.org/doc/libs/1_49_0/libs/iterator/doc/index.html
Indeed, however if I read it right filter_iterator requires a predicate, just as boost.adaptors.filtered does, and the construction of the predicate from a method requires the explicit use of bind, or mem_fn, whereas I'd hoped to see a facility offering an overload that accepts a pointer-to-member directly. Thx, R.