Original Post
Okay, so I had some tips on function objects yesterday that I'd like to follow through on hopefully. Assuming I have the following class: class CPerson { // for simplicity public: string Name; int Age; }; Now, I have a variable defined: vector People; How would you design a function object (it must be a function object) that could be used with find_if to search through the People to find the record with a particular name (designated at run-time). Morbo pointed out yesterday that I should avoid binary_function derivation, so that removes bind2nd as an option: find_if(People.begin(), People.end(), bind2nd(FuncObj(),"MyName")); So how would you do it without deriving from binary_function and using bind2nd. I agree that coming from binary_function is messy, with templates and everything, but I am not seeing a clean solution without bind2nd. Many thanks, Gerb