$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-05-16 10:12:59
On Thursday 16 May 2002 10:53 am, Ian Whittley wrote:
> This allows the code to be written as:
>
> vector<int>::iterator i = find_if(a.begin(),a.end(), greater_than(x) &&
> less_than(y) );
>
> And i defy any C++ programmer to misunderstand that code!
How about this:
vector<int>::iterator i = find_if(a.begin(), a.end(), _1 > x && _1 < y);
Check out the Boost.Lambda library just added for 1.28.0. I think you'll be
pleasantly surprised.
Doug