From 101b5288ffa988b86fc1fe83f3ff65c9694b1484 Mon Sep 17 00:00:00 2001 From: Marc Chevrier Date: Thu, 7 Nov 2019 18:19:49 +0100 Subject: cmAlgorithm: Extend cmAppend capabilities --- Source/cmAlgorithms.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h index e0d27ee..e83f160 100644 --- a/Source/cmAlgorithms.h +++ b/Source/cmAlgorithms.h @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -144,6 +145,13 @@ void cmDeleteAll(Range const& r) ContainerAlgorithms::DefaultDeleter()); } +template +void cmAppend(std::vector& v, std::vector> const& r) +{ + std::transform(r.begin(), r.end(), std::back_inserter(v), + [](const std::unique_ptr& item) { return item.get(); }); +} + template void cmAppend(std::vector& v, Range const& r) { -- cgit v0.12