File indexing completed on 2025-09-17 08:40:31
0001
0002
0003
0004
0005
0006 #ifndef BOOST_PARSER_CONFIG_HPP
0007 #define BOOST_PARSER_CONFIG_HPP
0008
0009 #include <boost/parser/detail/debug_assert.hpp>
0010
0011
0012 #include <iterator>
0013
0014
0015 #ifdef BOOST_PARSER_DOXYGEN
0016
0017
0018
0019
0020
0021
0022
0023
0024 # define BOOST_PARSER_NO_RUNTIME_ASSERTIONS
0025
0026
0027
0028
0029
0030
0031
0032 # define BOOST_PARSER_ASSERT(condition)
0033
0034
0035
0036
0037 # define BOOST_PARSER_DISABLE_CONCEPTS
0038
0039
0040
0041 # define BOOST_PARSER_USE_HANA_TUPLE
0042
0043
0044
0045
0046
0047
0048 # define BOOST_PARSER_MAX_AGGREGATE_SIZE 25
0049
0050
0051
0052
0053 # define BOOST_PARSER_SUBRANGE
0054
0055
0056
0057
0058
0059
0060 # define BOOST_PARSER_TRACE_TO_VS_OUTPUT
0061
0062 #else
0063
0064 # ifdef BOOST_PARSER_NO_RUNTIME_ASSERTIONS
0065 # define BOOST_PARSER_ASSERT(condition) static_assert(condition)
0066 # elif defined(BOOST_PARSER_HAVE_BOOST_ASSERT)
0067 # define BOOST_PARSER_ASSERT(condition) BOOST_ASSERT(condition)
0068 # elif BOOST_DISABLE_ASSERTS
0069 # define BOOST_PARSER_ASSERT(condition) ((void)0)
0070 # else
0071 # define BOOST_PARSER_ASSERT(condition) assert(condition)
0072 # endif
0073
0074 #endif
0075
0076
0077 #if defined(__clang__) && !defined(__ibmxl__) && !defined(__CODEGEARC__)
0078 #elif defined(__GNUC__) && !defined(__ibmxl__)
0079 #define BOOST_PARSER_GCC
0080 #endif
0081
0082 #if defined(__cpp_lib_constexpr_algorithms)
0083 # define BOOST_PARSER_ALGO_CONSTEXPR constexpr
0084 #else
0085 # define BOOST_PARSER_ALGO_CONSTEXPR
0086 #endif
0087
0088 #if defined(__cpp_lib_concepts) && !defined(BOOST_PARSER_DISABLE_CONCEPTS) && \
0089 (!defined(__clang_major__) || 16 <= __clang_major__)
0090 # define BOOST_PARSER_USE_CONCEPTS 1
0091 #else
0092 # define BOOST_PARSER_USE_CONCEPTS 0
0093 #endif
0094
0095 #if defined(__cpp_lib_ranges) && BOOST_PARSER_USE_CONCEPTS
0096 # define BOOST_PARSER_SUBRANGE std::ranges::subrange
0097 #else
0098 # include <boost/parser/subrange.hpp>
0099 # define BOOST_PARSER_SUBRANGE boost::parser::subrange
0100 #endif
0101
0102 #if defined(BOOST_PARSER_USE_HANA_TUPLE)
0103 # define BOOST_PARSER_USE_STD_TUPLE 0
0104 #else
0105 # define BOOST_PARSER_USE_STD_TUPLE 1
0106 #endif
0107
0108 #if !defined(BOOST_PARSER_MAX_AGGREGATE_SIZE)
0109 # define BOOST_PARSER_MAX_AGGREGATE_SIZE 25
0110 #endif
0111
0112
0113 #if !defined(_MSC_VER) || 1930 <= _MSC_VER
0114 # define BOOST_PARSER_CONSTEXPR constexpr
0115 #else
0116 # define BOOST_PARSER_CONSTEXPR
0117 #endif
0118
0119 #if defined(_MSC_VER) && defined(BOOST_PARSER_TRACE_TO_VS_OUTPUT)
0120 # define BOOST_PARSER_TRACE_OSTREAM boost::parser::detail::vs_cout
0121 #else
0122 # define BOOST_PARSER_TRACE_OSTREAM std::cout
0123 #endif
0124
0125 #endif