diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2019-12-09 16:39:29 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2019-12-17 09:44:02 (GMT) |
commit | f7d12609f038a0e4e09f9a40fa081c4a4db3e56b (patch) | |
tree | c20d476dfb30aa3772797b2d66d27bbedd1ce662 /Source/cmAlgorithms.h | |
parent | a38d04c0764b3550bd7d17b659945a38c1368f1e (diff) | |
download | CMake-f7d12609f038a0e4e09f9a40fa081c4a4db3e56b.zip CMake-f7d12609f038a0e4e09f9a40fa081c4a4db3e56b.tar.gz CMake-f7d12609f038a0e4e09f9a40fa081c4a4db3e56b.tar.bz2 |
Refactoring: use append functions from cmext/algorithm
Diffstat (limited to 'Source/cmAlgorithms.h')
-rw-r--r-- | Source/cmAlgorithms.h | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h index def3ac7..a179acb 100644 --- a/Source/cmAlgorithms.h +++ b/Source/cmAlgorithms.h @@ -145,33 +145,6 @@ void cmDeleteAll(Range const& r) ContainerAlgorithms::DefaultDeleter<Range>()); } -template <typename T> -void cmAppend(std::vector<std::unique_ptr<T>>& v, - std::vector<std::unique_ptr<T>>&& r) -{ - std::transform(r.begin(), r.end(), std::back_inserter(v), - [](std::unique_ptr<T>& item) { return std::move(item); }); -} - -template <typename T> -void cmAppend(std::vector<T*>& v, std::vector<std::unique_ptr<T>> const& r) -{ - std::transform(r.begin(), r.end(), std::back_inserter(v), - [](const std::unique_ptr<T>& item) { return item.get(); }); -} - -template <typename T, typename Range> -void cmAppend(std::vector<T>& v, Range const& r) -{ - v.insert(v.end(), r.begin(), r.end()); -} - -template <typename T, typename InputIt> -void cmAppend(std::vector<T>& v, InputIt first, InputIt last) -{ - v.insert(v.end(), first, last); -} - template <typename Range> typename Range::const_iterator cmRemoveN(Range& r, size_t n) { |