1 #ifndef BOOST_METAPARSE_CONFIG_HPP
2 #define BOOST_METAPARSE_CONFIG_HPP
3 
4 // Copyright Abel Sinkovics (abel@sinkovics.hu)  2013.
5 // Distributed under the Boost Software License, Version 1.0.
6 //    (See accompanying file LICENSE_1_0.txt or copy at
7 //          http://www.boost.org/LICENSE_1_0.txt)
8 
9 #include <boost/config.hpp>
10 
11 /*
12  * Compiler workarounds
13  */
14 
15 // BOOST_NO_CXX11_CONSTEXPR is not defined in gcc 4.6
16 #if \
17   defined BOOST_NO_CXX11_CONSTEXPR || defined BOOST_NO_CONSTEXPR || ( \
18     !defined __clang__ && defined __GNUC__ \
19     && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7)) \
20   )
21 
22 #  define BOOST_NO_CONSTEXPR_C_STR
23 
24 #endif
25 
26 /*
27  * C++ standard to use
28  */
29 
30 // Allow overriding this
31 #ifndef BOOST_METAPARSE_STD
32 
33 // special-case MSCV >= 1900 as its constexpr support is good enough for
34 // Metaparse
35 #  if \
36     !defined BOOST_NO_CXX11_VARIADIC_TEMPLATES \
37     && !defined BOOST_NO_VARIADIC_TEMPLATES \
38     && ( \
39       (!defined BOOST_NO_CONSTEXPR && !defined BOOST_NO_CXX11_CONSTEXPR) \
40       || (defined _MSC_VER && _MSC_VER >= 1900) \
41     ) \
42     && (!defined BOOST_GCC || BOOST_GCC >= 40700)
43 
44 #    if !defined BOOST_NO_CXX14_CONSTEXPR
45 
46 #      define BOOST_METAPARSE_STD 2014
47 
48 #    else
49 
50 #      define BOOST_METAPARSE_STD 2011
51 
52 #    endif
53 
54 #  else
55 
56 #    define BOOST_METAPARSE_STD 1998
57 
58 #  endif
59 
60 #endif
61 
62 /*
63  * Metaparse config
64  */
65 
66 #if BOOST_METAPARSE_STD >= 2011
67 #  define BOOST_METAPARSE_VARIADIC_STRING
68 #endif
69 
70 #endif
71 
72