File indexing completed on 2026-09-13 09:00:59
0001 #
0002
0003
0004
0005
0006
0007
0008
0009 0010 ">#
0011 #
0012 0013 ">#
0014 # ifndef BOOST_PREPROCESSOR_SEQ_FOR_EACH_I_HPP
0015 # define BOOST_PREPROCESSOR_SEQ_FOR_EACH_I_HPP
0016 0017 ">#
0018 # include <boost/preprocessor/arithmetic/dec.hpp>
0019 # include <boost/preprocessor/arithmetic/inc.hpp>
0020 # include <boost/preprocessor/config/config.hpp>
0021 # include <boost/preprocessor/control/if.hpp>
0022 # include <boost/preprocessor/control/iif.hpp>
0023 # include <boost/preprocessor/repetition/for.hpp>
0024 # include <boost/preprocessor/seq/seq.hpp>
0025 # include <boost/preprocessor/seq/size.hpp>
0026 # include <boost/preprocessor/seq/detail/is_empty.hpp>
0027 # include <boost/preprocessor/tuple/elem.hpp>
0028 # include <boost/preprocessor/tuple/rem.hpp>
0029 0030 ">#
0031 #
0032 0033 ">#
0034 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0035 # define BOOST_PP_SEQ_FOR_EACH_I(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK(macro, data, seq)
0036 # else
0037 # define BOOST_PP_SEQ_FOR_EACH_I(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_I(macro, data, seq)
0038 # define BOOST_PP_SEQ_FOR_EACH_I_I(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK(macro, data, seq)
0039 # endif
0040 0041 ">#
0042 # define BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EXEC(macro, data, seq) BOOST_PP_FOR((macro, data, seq, 0, BOOST_PP_SEQ_SIZE(seq)), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M)
0043 # define BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EMPTY(macro, data, seq)
0044 0045 ">#
0046 # define BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK(macro, data, seq) \
0047 BOOST_PP_IIF \
0048 ( \
0049 BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq), \
0050 BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EXEC, \
0051 BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EMPTY \
0052 ) \
0053 (macro, data, seq) \
0054
0055 0056 ">#
0057 # define BOOST_PP_SEQ_FOR_EACH_I_P(r, x) BOOST_PP_TUPLE_ELEM(5, 4, x)
0058 0059 ">#
0060 # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
0061 # define BOOST_PP_SEQ_FOR_EACH_I_O(r, x) BOOST_PP_SEQ_FOR_EACH_I_O_I x
0062 # else
0063 # define BOOST_PP_SEQ_FOR_EACH_I_O(r, x) BOOST_PP_SEQ_FOR_EACH_I_O_I(BOOST_PP_TUPLE_ELEM(5, 0, x), BOOST_PP_TUPLE_ELEM(5, 1, x), BOOST_PP_TUPLE_ELEM(5, 2, x), BOOST_PP_TUPLE_ELEM(5, 3, x), BOOST_PP_TUPLE_ELEM(5, 4, x))
0064 # endif
0065 0066 ">#
0067 # define BOOST_PP_SEQ_FOR_EACH_I_O_I(macro, data, seq, i, sz) \
0068 BOOST_PP_SEQ_FOR_EACH_I_O_I_DEC(macro, data, seq, i, BOOST_PP_DEC(sz)) \
0069
0070 # define BOOST_PP_SEQ_FOR_EACH_I_O_I_DEC(macro, data, seq, i, sz) \
0071 ( \
0072 macro, \
0073 data, \
0074 BOOST_PP_IF \
0075 ( \
0076 sz, \
0077 BOOST_PP_SEQ_FOR_EACH_I_O_I_TAIL, \
0078 BOOST_PP_SEQ_FOR_EACH_I_O_I_NIL \
0079 ) \
0080 (seq), \
0081 BOOST_PP_INC(i), \
0082 sz \
0083 ) \
0084
0085 # define BOOST_PP_SEQ_FOR_EACH_I_O_I_TAIL(seq) BOOST_PP_SEQ_TAIL(seq)
0086 # define BOOST_PP_SEQ_FOR_EACH_I_O_I_NIL(seq) BOOST_PP_NIL
0087 0088 ">#
0089 # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
0090 # define BOOST_PP_SEQ_FOR_EACH_I_M(r, x) BOOST_PP_SEQ_FOR_EACH_I_M_IM(r, BOOST_PP_TUPLE_REM_5 x)
0091 # define BOOST_PP_SEQ_FOR_EACH_I_M_IM(r, im) BOOST_PP_SEQ_FOR_EACH_I_M_I(r, im)
0092 # else
0093 # define BOOST_PP_SEQ_FOR_EACH_I_M(r, x) BOOST_PP_SEQ_FOR_EACH_I_M_I(r, BOOST_PP_TUPLE_ELEM(5, 0, x), BOOST_PP_TUPLE_ELEM(5, 1, x), BOOST_PP_TUPLE_ELEM(5, 2, x), BOOST_PP_TUPLE_ELEM(5, 3, x), BOOST_PP_TUPLE_ELEM(5, 4, x))
0094 # endif
0095 0096 ">#
0097 # define BOOST_PP_SEQ_FOR_EACH_I_M_I(r, macro, data, seq, i, sz) macro(r, data, i, BOOST_PP_SEQ_HEAD(seq))
0098 0099 ">#
0100 #
0101 0102 ">#
0103 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0104 # define BOOST_PP_SEQ_FOR_EACH_I_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK(r, macro, data, seq)
0105 # else
0106 # define BOOST_PP_SEQ_FOR_EACH_I_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_R_I(r, macro, data, seq)
0107 # define BOOST_PP_SEQ_FOR_EACH_I_R_I(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK(r, macro, data, seq)
0108 # endif
0109 0110 ">#
0111 # define BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EXEC(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq, 0, BOOST_PP_SEQ_SIZE(seq)), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M)
0112 # define BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EMPTY(r, macro, data, seq)
0113 0114 ">#
0115 # define BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK(r, macro, data, seq) \
0116 BOOST_PP_IIF \
0117 ( \
0118 BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq), \
0119 BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EXEC, \
0120 BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EMPTY \
0121 ) \
0122 (r, macro, data, seq) \
0123
0124 0125 ">#
0126 # endif