$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] using bind with find_if
From: Igor R (boost.lists_at_[hidden])
Date: 2011-03-09 16:33:53
> I don't want to find elements equal to a specific element. Â I want to find
> an element that meets specific criteria -- that is, find the element for
> which two of its data members have specific values. Â If I already had all
> the criteria for the element, I wouldn't need to find it in the first place!
I see...
You can do something like this:
std::find_if(FOverridesContainer.begin(), FOverridesContainer.end(),
boost::bind(OverrideMatches(), _1, ChildItemRecNo, LinkItemRecNo));
or with Boost.Range algorithm:
boost::find_if(FOverridesContainer, boost::bind(OverrideMatches(), _1,
ChildItemRecNo, LinkItemRecNo));