summaryrefslogtreecommitdiff
path: root/boost/metaparse/config.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/metaparse/config.hpp')
-rw-r--r--boost/metaparse/config.hpp35
1 files changed, 29 insertions, 6 deletions
diff --git a/boost/metaparse/config.hpp b/boost/metaparse/config.hpp
index a9a42dbb60..2e8e6a2931 100644
--- a/boost/metaparse/config.hpp
+++ b/boost/metaparse/config.hpp
@@ -24,17 +24,40 @@
#endif
/*
- * Metaparse config
+ * C++ standard to use
*/
-#if \
- !defined BOOST_NO_CXX11_VARIADIC_TEMPLATES \
- && !defined BOOST_NO_VARIADIC_TEMPLATES \
- && !defined BOOST_METAPARSE_VARIADIC_STRING
+// Allow overriding this
+#ifndef BOOST_METAPARSE_STD
-# define BOOST_METAPARSE_VARIADIC_STRING
+// special-case MSCV >= 1900 as its constexpr support is good enough for
+// Metaparse
+# if \
+ !defined BOOST_NO_CXX11_VARIADIC_TEMPLATES \
+ && !defined BOOST_NO_VARIADIC_TEMPLATES \
+ && ( \
+ (!defined BOOST_NO_CONSTEXPR && !defined BOOST_NO_CXX11_CONSTEXPR) \
+ || (defined _MSC_VER && _MSC_VER >= 1900) \
+ ) \
+ && (!defined BOOST_GCC || BOOST_GCC >= 40700)
+
+# define BOOST_METAPARSE_STD 2011
+
+# else
+
+# define BOOST_METAPARSE_STD 1998
+
+# endif
#endif
+/*
+ * Metaparse config
+ */
+
+#if BOOST_METAPARSE_STD >= 2011
+# define BOOST_METAPARSE_VARIADIC_STRING
+#endif
+
#endif