std::find_if with bind and iequals to create predicate

26 Aug
2008
26 Aug
'08
10:07 a.m.
Hello, I've a container of these objects: class Search { public: ... const std::string& getName() const {return name_;} }; I want to find a search in a case insensitive manner and this works: iter = std::find_if(searches.begin(),searches.end(), boost::bind(&boost::iequalsstd::string,std::string,boost::bind(&Search::getName,_1),searchName,std::locale())); However, I would've preferred to not have to specify the template parameters to iequals, and not have to specify the locale argument to iequals (it's optional). Is there a cleaner way to do this? Regards, Jim
6025
Age (days ago)
6025
Last active (days ago)
0 comments
1 participants
participants (1)
-
Peter Barker