On Tue, Jan 06, 2004 at 07:44:47PM +0100, Lars Gullik Bjønnes wrote: > struct SameName : public std::unary_function<Foo, bool> { > SameName(std::string const & name) : name_(name) {} > bool operator()(Foo const & foo) const { return foo.name() == name_; } > std::string name_; > }; > > and as lambda: > > bind(&Foo::name, _1) == name > > | I don't think this is convincing evidence.
I am not sure the public std::unary_function<Foo, bool> is needed. It might be political correct, though. And you missed approaches #2 and #3 which were proposed earlier. Does that mean these are not on the table anymore? > | IMO there is a draw between 'old fashioned code' and lambda and the tie > | breaker 'simple standard constructs' prefers 'old fashioned code'. > > can you add some commas to make me understand the sentence? IMO there is a draw between 'old fashioned code' and lambda. If one needs to decide for one or the other, other criteria are needed. 'simple standard constructs' would be one of them. Andre'