fixing stuff
[dyninst.git] / dynutil / h / dyn_detail / boost / preprocessor / list / for_each_i.hpp
1 # /* Copyright (C) 2001
2 #  * Housemarque Oy
3 #  * http://www.housemarque.com
4 #  *
5 #  * Distributed under the Boost Software License, Version 1.0. (See
6 #  * accompanying file LICENSE_1_0.txt or copy at
7 #  * http://www.boost.org/LICENSE_1_0.txt)
8 #  */
9 #
10 # /* Revised by Paul Mensonides (2002) */
11 #
12 # /* See http://www.boost.org for most recent version. */
13 #
14 # ifndef DYN_DETAIL_BOOST_PREPROCESSOR_LIST_LIST_FOR_EACH_I_HPP
15 # define DYN_DETAIL_BOOST_PREPROCESSOR_LIST_LIST_FOR_EACH_I_HPP
16 #
17 # include <dyn_detail/boost/preprocessor/arithmetic/inc.hpp>
18 # include <dyn_detail/boost/preprocessor/config/config.hpp>
19 # include <dyn_detail/boost/preprocessor/list/adt.hpp>
20 # include <dyn_detail/boost/preprocessor/repetition/for.hpp>
21 # include <dyn_detail/boost/preprocessor/tuple/elem.hpp>
22 # include <dyn_detail/boost/preprocessor/tuple/rem.hpp>
23 #
24 # /* DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I */
25 #
26 # if ~DYN_DETAIL_BOOST_PP_CONFIG_FLAGS() & DYN_DETAIL_BOOST_PP_CONFIG_EDG() && ~DYN_DETAIL_BOOST_PP_CONFIG_FLAGS() & DYN_DETAIL_BOOST_PP_CONFIG_MSVC()
27 #    define DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I(macro, data, list) DYN_DETAIL_BOOST_PP_FOR((macro, data, list, 0), DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_P, DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_O, DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_M)
28 # else
29 #    define DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I(macro, data, list) DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_I(macro, data, list)
30 #    define DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_I(macro, data, list) DYN_DETAIL_BOOST_PP_FOR((macro, data, list, 0), DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_P, DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_O, DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_M)
31 # endif
32 #
33 # if DYN_DETAIL_BOOST_PP_CONFIG_FLAGS() & DYN_DETAIL_BOOST_PP_CONFIG_STRICT()
34 #    define DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_P(r, x) DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_P_D x
35 #    define DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_P_D(m, d, l, i) DYN_DETAIL_BOOST_PP_LIST_IS_CONS(l)
36 # else
37 #    define DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_P(r, x) DYN_DETAIL_BOOST_PP_LIST_IS_CONS(DYN_DETAIL_BOOST_PP_TUPLE_ELEM(4, 2, x))
38 # endif
39 #
40 # if ~DYN_DETAIL_BOOST_PP_CONFIG_FLAGS() & DYN_DETAIL_BOOST_PP_CONFIG_MWCC()
41 #    define DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_O(r, x) DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_O_D x
42 #    define DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_O_D(m, d, l, i) (m, d, DYN_DETAIL_BOOST_PP_LIST_REST(l), DYN_DETAIL_BOOST_PP_INC(i))
43 # else
44 #    define DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_O(r, x) (DYN_DETAIL_BOOST_PP_TUPLE_ELEM(4, 0, x), DYN_DETAIL_BOOST_PP_TUPLE_ELEM(4, 1, x), DYN_DETAIL_BOOST_PP_LIST_REST(DYN_DETAIL_BOOST_PP_TUPLE_ELEM(4, 2, x)), DYN_DETAIL_BOOST_PP_INC(DYN_DETAIL_BOOST_PP_TUPLE_ELEM(4, 3, x)))
45 # endif
46 #
47 # if ~DYN_DETAIL_BOOST_PP_CONFIG_FLAGS() & DYN_DETAIL_BOOST_PP_CONFIG_EDG()
48 #    define DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_M(r, x) DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_M_D(r, DYN_DETAIL_BOOST_PP_TUPLE_ELEM(4, 0, x), DYN_DETAIL_BOOST_PP_TUPLE_ELEM(4, 1, x), DYN_DETAIL_BOOST_PP_TUPLE_ELEM(4, 2, x), DYN_DETAIL_BOOST_PP_TUPLE_ELEM(4, 3, x))
49 # else
50 #    define DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_M(r, x) DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_M_I(r, DYN_DETAIL_BOOST_PP_TUPLE_REM_4 x)
51 #    define DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_M_I(r, x_e) DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_M_D(r, x_e)
52 # endif
53 #
54 # define DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_M_D(r, m, d, l, i) m(r, d, i, DYN_DETAIL_BOOST_PP_LIST_FIRST(l))
55 #
56 # /* DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_R */
57 #
58 # if ~DYN_DETAIL_BOOST_PP_CONFIG_FLAGS() & DYN_DETAIL_BOOST_PP_CONFIG_EDG()
59 #    define DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_R(r, macro, data, list) DYN_DETAIL_BOOST_PP_FOR_ ## r((macro, data, list, 0), DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_P, DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_O, DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_M)
60 # else
61 #    define DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_R(r, macro, data, list) DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_R_I(r, macro, data, list)
62 #    define DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_R_I(r, macro, data, list) DYN_DETAIL_BOOST_PP_FOR_ ## r((macro, data, list, 0), DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_P, DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_O, DYN_DETAIL_BOOST_PP_LIST_FOR_EACH_I_M)
63 # endif
64 #
65 # endif