git-svn-id: https://svn.middleware.georgetown.edu/cpp-xmltooling/trunk@422
de75baf8-a10c-0410-a50a-
987c0e22f00f
* @return the first object in the container matching the predicate, or NULL
*/
template<typename Container, typename Predicate>
* @return the first object in the container matching the predicate, or NULL
*/
template<typename Container, typename Predicate>
- typename Container::value_type find_if(const typename Container& c, const typename Predicate& p) {
- Container::const_iterator i = std::find_if(c.begin(), c.end(), p);
+ typename Container::value_type find_if(const Container& c, const Predicate& p) {
+ typename Container::const_iterator i = std::find_if(c.begin(), c.end(), p);
return (i!=c.end()) ? *i : NULL;
}
return (i!=c.end()) ? *i : NULL;
}