From 83ffbf028f8a77bfab23328aa8f2280db5539329 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 6 Nov 2016 20:11:50 -0800 Subject: [PATCH] [Maps] Add overload for map (existing: unordered_map) --- toolsrc/include/vcpkg_Maps.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/toolsrc/include/vcpkg_Maps.h b/toolsrc/include/vcpkg_Maps.h index 8868892941..c67462a392 100644 --- a/toolsrc/include/vcpkg_Maps.h +++ b/toolsrc/include/vcpkg_Maps.h @@ -2,6 +2,7 @@ #include #include +#include namespace vcpkg { namespace Maps { @@ -26,4 +27,15 @@ namespace vcpkg { namespace Maps } return key_set; } + + template + std::vector extract_keys(const std::map& input_map) + { + std::vector key_set; + for (auto const& element : input_map) + { + key_set.push_back(element.first); + } + return key_set; + } }}