Boost logo

Boost Users :

From: Russell Hind (yg-boost-users_at_[hidden])
Date: 2003-05-13 11:31:06


I have an object that has a member get_name which returns a string. I
have a collection of these objects and would like to find one with a
particular name. I am currently using find_if, equal and bind

find_if(objects.begin(), objects.end(),
         bind(equal_to<string>(), name, bind(&object::get_name, _1)));

Given Lambda doesn't compile under BCB6, is there an easier way to do
this rather than having to make up 2 bind statements?

Thanks

Russell


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