From 8160a96b28dd2789875214af128b73a270ee691b Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Fri, 20 Jun 2014 18:17:04 +0000 Subject: [PATCH] base: prepare Array for initializer_list when Visual Studio finally has it. --- src/lol/base/array.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/lol/base/array.h b/src/lol/base/array.h index d1f3155f..5cf49a5f 100644 --- a/src/lol/base/array.h +++ b/src/lol/base/array.h @@ -24,6 +24,9 @@ #include /* for placement new */ #include /* for std::swap */ #include +#if 0 // disabled: Visual Studio 2012 doesn't have this +#include +#endif namespace lol { @@ -46,6 +49,18 @@ public: { } +#if 0 + inline ArrayBase(std::initializer_list list) + : m_data(0), + m_count(0), + m_reserved(0) + { + Reserve(list.size); + for (auto elem : list) + Push(elem); + } +#endif + inline ~ArrayBase() { for (int i = 0; i < m_count; i++)