diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-02-11 22:53:41 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-02-20 20:36:58 (GMT) |
commit | a3a0a8c222b59f15502f52192bf41c4af2882392 (patch) | |
tree | 4e81cfc4f9c082a58e911c364dcb65448425b7c7 /Source/cmAlgorithms.h | |
parent | 8c74a41ff3b6fce1bb7d088d16f5e0a9ae8ab55d (diff) | |
download | CMake-a3a0a8c222b59f15502f52192bf41c4af2882392.zip CMake-a3a0a8c222b59f15502f52192bf41c4af2882392.tar.gz CMake-a3a0a8c222b59f15502f52192bf41c4af2882392.tar.bz2 |
cmAlgorithms: Add cmFindNot algorithm.
Diffstat (limited to 'Source/cmAlgorithms.h')
-rw-r--r-- | Source/cmAlgorithms.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h index 53e2dc8..d88de1e 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, 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 |