|
Boost Users : |
Subject: Re: [Boost-users] [range] count vs count_if
From: Bill Buklis (boostusr_at_[hidden])
Date: 2012-02-14 13:26:16
Out of curiosity I have one more variation on _if vs non _if. Since you
can use distance instead of count_if, how would you go about replacing
find_if with a non _if variant?
For example:
struct data
{
int a;
int b;
};
// function object that takes two data parameters - contents unimportant
for the example
struct match_data;
std::vector<data> data_range;
data search_value;
boost::find_if( data_range, boost::bind(match_data(), _1, search_value) );
Thanks,
-- Bill
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net