From a3a0a8c222b59f15502f52192bf41c4af2882392 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 11 Feb 2015 23:53:41 +0100 Subject: [PATCH] cmAlgorithms: Add cmFindNot algorithm. --- Source/cmAlgorithms.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h index 53e2dc877..d88de1ed3 100644 --- a/Source/cmAlgorithms.h +++ b/Source/cmAlgorithms.h @@ -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::const_iterator cmFindNot(Range const& r, T const& t) +{ + return std::find_if(r.begin(), r.end(), + std::bind1st(std::not_equal_to(), t)); +} + #endif