Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:49:28

0001 # /* **************************************************************************
0002 #  *                                                                          *
0003 #  *     (C) Copyright Paul Mensonides 2002.
0004 #  *     Distributed under the Boost Software License, Version 1.0. (See
0005 #  *     accompanying file LICENSE_1_0.txt or copy at
0006 #  *     http://www.boost.org/LICENSE_1_0.txt)
0007 #  *                                                                          *
0008 #  ************************************************************************** */
0009 #
0010 # /* See http://www.boost.org for most recent version. */
0011 #
0012 # ifndef BOOST_PREPROCESSOR_SEQ_FOR_EACH_I_HPP
0013 # define BOOST_PREPROCESSOR_SEQ_FOR_EACH_I_HPP
0014 #
0015 # include <boost/preprocessor/arithmetic/dec.hpp>
0016 # include <boost/preprocessor/arithmetic/inc.hpp>
0017 # include <boost/preprocessor/config/config.hpp>
0018 # include <boost/preprocessor/control/if.hpp>
0019 # include <boost/preprocessor/control/iif.hpp>
0020 # include <boost/preprocessor/repetition/for.hpp>
0021 # include <boost/preprocessor/seq/seq.hpp>
0022 # include <boost/preprocessor/seq/size.hpp>
0023 # include <boost/preprocessor/seq/detail/is_empty.hpp>
0024 # include <boost/preprocessor/tuple/elem.hpp>
0025 # include <boost/preprocessor/tuple/rem.hpp>
0026 #
0027 # /* BOOST_PP_SEQ_FOR_EACH_I */
0028 #
0029 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0030 #    define BOOST_PP_SEQ_FOR_EACH_I(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK(macro, data, seq)
0031 # else
0032 #    define BOOST_PP_SEQ_FOR_EACH_I(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_I(macro, data, seq)
0033 #    define BOOST_PP_SEQ_FOR_EACH_I_I(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK(macro, data, seq)
0034 # endif
0035 #
0036 #    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)
0037 #    define BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EMPTY(macro, data, seq)
0038 #
0039 #    define BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK(macro, data, seq) \
0040         BOOST_PP_IIF \
0041             ( \
0042             BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq), \
0043             BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EXEC, \
0044             BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EMPTY \
0045             ) \
0046         (macro, data, seq) \
0047 /**/
0048 #
0049 # define BOOST_PP_SEQ_FOR_EACH_I_P(r, x) BOOST_PP_TUPLE_ELEM(5, 4, x)
0050 #
0051 # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
0052 #    define BOOST_PP_SEQ_FOR_EACH_I_O(r, x) BOOST_PP_SEQ_FOR_EACH_I_O_I x
0053 # else
0054 #    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))
0055 # endif
0056 #
0057 # define BOOST_PP_SEQ_FOR_EACH_I_O_I(macro, data, seq, i, sz) \
0058     BOOST_PP_SEQ_FOR_EACH_I_O_I_DEC(macro, data, seq, i, BOOST_PP_DEC(sz)) \
0059 /**/
0060 # define BOOST_PP_SEQ_FOR_EACH_I_O_I_DEC(macro, data, seq, i, sz) \
0061     ( \
0062     macro, \
0063     data, \
0064     BOOST_PP_IF \
0065         ( \
0066         sz, \
0067         BOOST_PP_SEQ_FOR_EACH_I_O_I_TAIL, \
0068         BOOST_PP_SEQ_FOR_EACH_I_O_I_NIL \
0069         ) \
0070     (seq), \
0071     BOOST_PP_INC(i), \
0072     sz \
0073     ) \
0074 /**/
0075 # define BOOST_PP_SEQ_FOR_EACH_I_O_I_TAIL(seq) BOOST_PP_SEQ_TAIL(seq)
0076 # define BOOST_PP_SEQ_FOR_EACH_I_O_I_NIL(seq) BOOST_PP_NIL
0077 #
0078 # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
0079 #    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)
0080 #    define BOOST_PP_SEQ_FOR_EACH_I_M_IM(r, im) BOOST_PP_SEQ_FOR_EACH_I_M_I(r, im)
0081 # else
0082 #    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))
0083 # endif
0084 #
0085 # define BOOST_PP_SEQ_FOR_EACH_I_M_I(r, macro, data, seq, i, sz) macro(r, data, i, BOOST_PP_SEQ_HEAD(seq))
0086 #
0087 # /* BOOST_PP_SEQ_FOR_EACH_I_R */
0088 #
0089 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0090 #    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)
0091 # else
0092 #    define BOOST_PP_SEQ_FOR_EACH_I_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_R_I(r, macro, data, seq)
0093 #    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)
0094 # endif
0095 #
0096 #    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)
0097 #    define BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EMPTY(r, macro, data, seq)
0098 #
0099 #    define BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK(r, macro, data, seq) \
0100         BOOST_PP_IIF \
0101             ( \
0102             BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq), \
0103             BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EXEC, \
0104             BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EMPTY \
0105             ) \
0106         (r, macro, data, seq) \
0107 /**/
0108 #
0109 # endif