Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-11-22 09:46:00


From: "Martin Bosticky" <mbosticky_at_[hidden]>
[...]
> Example:
>
> struct Option
> {
> string m_Name;
> string m_OptionParameters;
> };
>
> vector<Option> AVector_vec;
> ...
>
> // Find the preffered option
> vector<Option>::iterator AVector_it =
> find_if
> (
> AVector.begin(),
> AVector.end(),
> //
> // Identify when Option.vm_Member == "c"
> bind1st(adapt2ndArgument<Option>(equal_to<string>(),
&Option::m_Name),
> "c")

bind<bool>(equal_to<string>(), bind(&Option::m_Name, _1), "c")

> );


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk