File indexing completed on 2025-01-18 09:43:27
0001
0002
0003
0004
0005
0006 #ifndef BOOST_PARAMETER_AUX_PREPROCESSOR_IMPL_FOR_EACH_HPP
0007 #define BOOST_PARAMETER_AUX_PREPROCESSOR_IMPL_FOR_EACH_HPP
0008
0009 #define BOOST_PARAMETER_AUX_PP_FOR_EACH_head_aux2(x, y) (x, y), ~
0010 #define BOOST_PARAMETER_AUX_PP_FOR_EACH_head_aux3(x, y, z) (x, y, z), ~
0011 #define BOOST_PARAMETER_AUX_PP_FOR_EACH_head_aux4(x, y, z, u) (x, y, z, u), ~
0012
0013 #define \
0014 BOOST_PARAMETER_AUX_PP_FOR_EACH_pred_aux_BOOST_PARAMETER_AUX_PP_FOR_EACH_END_S
0015
0016
0017 #include <boost/preprocessor/detail/split.hpp>
0018
0019 #define BOOST_PARAMETER_AUX_PP_FOR_EACH_pred_SPLIT_FIRST(x) \
0020 BOOST_PP_SPLIT(0, x)
0021
0022
0023 #include <boost/preprocessor/cat.hpp>
0024
0025 #define BOOST_PARAMETER_AUX_PP_FOR_EACH_head(n, x) \
0026 BOOST_PP_SPLIT( \
0027 0 \
0028 , BOOST_PP_CAT(BOOST_PARAMETER_AUX_PP_FOR_EACH_head_aux, n) x \
0029 )
0030
0031
0032 #include <boost/preprocessor/facilities/is_empty.hpp>
0033 #include <boost/preprocessor/logical/not.hpp>
0034
0035 #define BOOST_PARAMETER_AUX_PP_FOR_EACH_pred_aux_check(x) \
0036 BOOST_PP_NOT(BOOST_PP_IS_EMPTY( \
0037 BOOST_PP_CAT(BOOST_PARAMETER_AUX_PP_FOR_EACH_pred_aux_, x) \
0038 )), ~
0039
0040
0041 #define BOOST_PARAMETER_AUX_PP_FOR_EACH_pred_aux2(x, y) \
0042 BOOST_PARAMETER_AUX_PP_FOR_EACH_pred_aux_check(x)
0043
0044
0045 #define BOOST_PARAMETER_AUX_PP_FOR_EACH_pred_aux3(x, y, z) \
0046 BOOST_PARAMETER_AUX_PP_FOR_EACH_pred_aux_check(x)
0047
0048
0049 #define BOOST_PARAMETER_AUX_PP_FOR_EACH_pred_aux4(x, y, z, u) \
0050 BOOST_PARAMETER_AUX_PP_FOR_EACH_pred_aux_check(x)
0051
0052
0053 #define BOOST_PARAMETER_AUX_PP_FOR_EACH_pred_aux0(n, x) \
0054 BOOST_PP_CAT(BOOST_PARAMETER_AUX_PP_FOR_EACH_pred_aux, n) x
0055
0056
0057 #include <boost/preprocessor/tuple/elem.hpp>
0058
0059 #if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
0060
0061 #define BOOST_PARAMETER_AUX_PP_FOR_EACH_pred(r, state) \
0062 BOOST_PARAMETER_AUX_PP_FOR_EACH_pred_SPLIT_FIRST( \
0063 BOOST_PARAMETER_AUX_PP_FOR_EACH_pred_aux0( \
0064 BOOST_PP_TUPLE_ELEM(5, 3, state) \
0065 , BOOST_PP_TUPLE_ELEM(5, 0, state) \
0066 ) \
0067 )
0068
0069
0070 #else
0071
0072 #define BOOST_PARAMETER_AUX_PP_FOR_EACH_pred(r, state) \
0073 BOOST_PP_SPLIT( \
0074 0 \
0075 , BOOST_PARAMETER_AUX_PP_FOR_EACH_pred_aux0( \
0076 BOOST_PP_TUPLE_ELEM(5, 3, state) \
0077 , BOOST_PP_TUPLE_ELEM(5, 0, state) \
0078 ) \
0079 )
0080
0081
0082 #endif
0083
0084 #include <boost/preprocessor/arithmetic/inc.hpp>
0085 #include <boost/preprocessor/tuple/eat.hpp>
0086
0087 #define BOOST_PARAMETER_AUX_PP_FOR_EACH_op(r, state) \
0088 ( \
0089 BOOST_PP_TUPLE_EAT(BOOST_PP_TUPLE_ELEM(5, 3, state)) \
0090 BOOST_PP_TUPLE_ELEM(5, 0, state) \
0091 , BOOST_PP_TUPLE_ELEM(5, 1, state) \
0092 , BOOST_PP_TUPLE_ELEM(5, 2, state) \
0093 , BOOST_PP_TUPLE_ELEM(5, 3, state) \
0094 , BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(5, 4, state)) \
0095 )
0096
0097
0098 #define BOOST_PARAMETER_AUX_PP_FOR_EACH_macro(r, state) \
0099 BOOST_PP_TUPLE_ELEM(5, 2, state)( \
0100 r \
0101 , BOOST_PP_TUPLE_ELEM(5, 4, state) \
0102 , BOOST_PARAMETER_AUX_PP_FOR_EACH_head( \
0103 BOOST_PP_TUPLE_ELEM(5, 3, state) \
0104 , BOOST_PP_TUPLE_ELEM(5, 0, state) \
0105 ) \
0106 , BOOST_PP_TUPLE_ELEM(5, 1, state) \
0107 )
0108
0109
0110 #include <boost/preprocessor/punctuation/comma_if.hpp>
0111
0112 #define BOOST_PARAMETER_AUX_PP_FOR_EACH_build_end_sentinel(z, n, text) \
0113 BOOST_PP_COMMA_IF(n) BOOST_PARAMETER_AUX_PP_FOR_EACH_END_S
0114
0115
0116 #include <boost/preprocessor/repetition/repeat.hpp>
0117
0118 #define BOOST_PARAMETER_AUX_PP_FOR_EACH_build_end_sentinel_tuple(arity) \
0119 ( \
0120 BOOST_PP_REPEAT( \
0121 arity, BOOST_PARAMETER_AUX_PP_FOR_EACH_build_end_sentinel, _ \
0122 ) \
0123 )
0124
0125
0126 #include <boost/preprocessor/repetition/for.hpp>
0127
0128 #define BOOST_PARAMETER_AUX_PP_FOR_EACH_R(r, arity, list, data, macro) \
0129 BOOST_PP_CAT(BOOST_PP_FOR_, r)( \
0130 (list \
0131 BOOST_PARAMETER_AUX_PP_FOR_EACH_build_end_sentinel_tuple(arity) \
0132 , data \
0133 , macro \
0134 , arity \
0135 , 0 \
0136 ) \
0137 , BOOST_PARAMETER_AUX_PP_FOR_EACH_pred \
0138 , BOOST_PARAMETER_AUX_PP_FOR_EACH_op \
0139 , BOOST_PARAMETER_AUX_PP_FOR_EACH_macro \
0140 )
0141
0142
0143 #include <boost/preprocessor/repetition/deduce_r.hpp>
0144
0145 #define BOOST_PARAMETER_AUX_PP_FOR_EACH(arity, list, data, macro) \
0146 BOOST_PARAMETER_AUX_PP_FOR_EACH_R( \
0147 BOOST_PP_DEDUCE_R(), arity, list, data, macro \
0148 )
0149
0150
0151 #endif
0152