diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2020-01-12 16:18:36 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2020-01-14 10:03:09 (GMT) |
commit | 328f586be7744350fbb5162dbb39eba255e68a6e (patch) | |
tree | 10198b56149982436763ecafa71bc624b6519bcc | |
parent | f466cea3c9edffb1f524b64c514f8b7ef3913988 (diff) | |
download | CMake-328f586be7744350fbb5162dbb39eba255e68a6e.zip CMake-328f586be7744350fbb5162dbb39eba255e68a6e.tar.gz CMake-328f586be7744350fbb5162dbb39eba255e68a6e.tar.bz2 |
cmAlgorithms.h: remove obsolete helpers
-rw-r--r-- | Source/cmAlgorithms.h | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h index 3b0a223..19da2a0 100644 --- a/Source/cmAlgorithms.h +++ b/Source/cmAlgorithms.h @@ -67,40 +67,6 @@ bool cmContains(Range const& range, Key const& key) namespace ContainerAlgorithms { -template <typename T> -struct cmIsPair -{ - enum - { - value = false - }; -}; - -template <typename K, typename V> -struct cmIsPair<std::pair<K, V>> -{ - enum - { - value = true - }; -}; - -template <typename Range, - bool valueTypeIsPair = cmIsPair<typename Range::value_type>::value> -struct DefaultDeleter -{ - void operator()(typename Range::value_type value) const { delete value; } -}; - -template <typename Range> -struct DefaultDeleter<Range, /* valueTypeIsPair = */ true> -{ - void operator()(typename Range::value_type value) const - { - delete value.second; - } -}; - template <typename FwdIt> FwdIt RemoveN(FwdIt i1, FwdIt i2, size_t n) { @@ -133,13 +99,6 @@ using cmBacktraceRange = cmRange<std::vector<cmListFileBacktrace>::const_iterator>; template <typename Range> -void cmDeleteAll(Range const& r) -{ - std::for_each(r.begin(), r.end(), - ContainerAlgorithms::DefaultDeleter<Range>()); -} - -template <typename Range> typename Range::const_iterator cmRemoveN(Range& r, size_t n) { return ContainerAlgorithms::RemoveN(r.begin(), r.end(), n); |