cmAlgorithms: Add cmFindNot algorithm.

This commit is contained in:
Stephen Kelly 2015-02-11 23:53:41 +01:00
parent 8c74a41ff3
commit a3a0a8c222
1 changed files with 7 additions and 0 deletions

View File

@ -295,4 +295,11 @@ std::string cmWrap(char prefix, Range const& r, char suffix, std::string sep)
return cmWrap(std::string(1, prefix), r, std::string(1, suffix), sep);
}
template<typename Range, typename T>
typename Range::const_iterator cmFindNot(Range const& r, T const& t)
{
return std::find_if(r.begin(), r.end(),
std::bind1st(std::not_equal_to<T>(), t));
}
#endif