diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2015-02-02 10:13:41 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2015-02-02 10:13:41 +0100 |
commit | 877c2529e86686cc2005e7a523d061c955a4f468 (patch) | |
tree | b166fa2bfdaba33e6e7608509334baa5329d780e /include/argument.h | |
parent | c169085cc9a9eb9c7c911d1b68db1f08a95c0d27 (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/argument.h')
-rw-r--r-- | include/argument.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/argument.h b/include/argument.h index ddb6390..f45a43a 100644 --- a/include/argument.h +++ b/include/argument.h @@ -144,10 +144,31 @@ private: }; /** + * Old Visual C++ environments do not support initializer lists + */ +#if defined(_MSC_VER) && _MSC_VER < 1800 + +/** + * For old visual c++ compilers, arguments should be passed as vectors + */ +using Arguments = std::vector<Argument>; + +/** + * Other compilers, and visual C++ 2013 do support initializer lists + */ +#else + +/** * A list of arguments can be supplied to methods * @type Arguments */ using Arguments = std::initializer_list<Argument>; + +/** + * End of visual C++ check + */ +#endif + /** * End of namespace |