summaryrefslogtreecommitdiff
path: root/include/array.h
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-02-02 10:13:41 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-02-02 10:13:41 +0100
commit877c2529e86686cc2005e7a523d061c955a4f468 (patch)
treeb166fa2bfdaba33e6e7608509334baa5329d780e /include/array.h
parentc169085cc9a9eb9c7c911d1b68db1f08a95c0d27 (diff)
It was reported (see http://www.php-cpp.com/documentation#comment-1830049280) that visual c++ has not support for initializer_lists, well at least old versions of it so not support it (see https://msdn.microsoft.com/en-us/library/hh567368.aspx), so we added a couple of extra checks to ensure that PHP-CPP also compilers on these olders compilers
Diffstat (limited to 'include/array.h')
-rw-r--r--include/array.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/array.h b/include/array.h
index 882670a..02fe4c4 100644
--- a/include/array.h
+++ b/include/array.h
@@ -57,12 +57,18 @@ public:
*/
template <typename T>
Array(const std::map<std::string,T> &value) : Value(value) {}
-
+
+// old visual c++ environments have no support for initializer lists
+# if !defined(_MSC_VER) || _MSC_VER >= 1800
+
/**
* Constructor from an initializer list
* @param value
*/
Array(const std::initializer_list<Value> &value) : Value(value) {}
+
+// end of visual c++ check
+# endif
/**
* Destructor