aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-10-04 16:24:03 -0700
committerRobert Schumacher <roschuma@microsoft.com>2017-10-04 16:24:03 -0700
commitc98db7541594eadccf6823d4fdde2ff8c53c5fe9 (patch)
tree5d6748c384cb46f0df59ced1f7f8dab4bd983bea /toolsrc/include
parent1b71053ad9954ffb0cb3c2955f42a86f62f66372 (diff)
downloadvcpkg-c98db7541594eadccf6823d4fdde2ff8c53c5fe9.tar.gz
vcpkg-c98db7541594eadccf6823d4fdde2ff8c53c5fe9.zip
[vcpkg] Refactor out implication in option parsing for export
Diffstat (limited to 'toolsrc/include')
-rw-r--r--toolsrc/include/Span.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/toolsrc/include/Span.h b/toolsrc/include/Span.h
index b2c9acdbc..a43e8f992 100644
--- a/toolsrc/include/Span.h
+++ b/toolsrc/include/Span.h
@@ -2,6 +2,7 @@
#include <array>
#include <cstddef>
+#include <initializer_list>
#include <vector>
template<class T>
@@ -17,6 +18,7 @@ public:
constexpr Span(std::nullptr_t) noexcept : Span() {}
constexpr Span(T* ptr, size_t count) noexcept : m_ptr(ptr), m_count(count) {}
constexpr Span(T* ptr_begin, T* ptr_end) noexcept : m_ptr(ptr_begin), m_count(ptr_end - ptr_begin) {}
+ constexpr Span(std::initializer_list<T> l) noexcept : m_ptr(l.begin()), m_count(l.size()) {}
template<size_t N>
constexpr Span(T (&arr)[N]) noexcept : Span(arr, N)