From 798f8a91e43bfdeda8113639ff262f42e5ab6f84 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 15 Oct 2017 23:53:35 -0700 Subject: Introduce Vectors::concatenate() --- toolsrc/include/vcpkg/base/util.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'toolsrc/include') diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index 3834580b6..4f06a8231 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -7,6 +7,18 @@ namespace vcpkg::Util { + template + using ElementT = std::remove_reference_t()))>; + + namespace Vectors + { + template> + void concatenate(std::vector* augend, const Container& addend) + { + augend->insert(augend->end(), addend.begin(), addend.end()); + } + } + template using FmapOut = decltype(std::declval()(*begin(std::declval()))); @@ -71,9 +83,6 @@ namespace vcpkg::Util return std::find_if(begin(cont), end(cont), pred); } - template - using ElementT = std::remove_reference_t()))>; - template> std::vector element_pointers(Container&& cont) { @@ -153,4 +162,4 @@ namespace vcpkg::Util std::unique_lock m_lock; T& m_ptr; }; -} \ No newline at end of file +} -- cgit v1.2.3