]> AND Private Git Repository - canny.git/blob - stc/exp/ml_stc_linux_make_v1.0/include/boost/preprocessor/seq/for_each_i.hpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
023645fa31ada4fc126d306c025e752a4563f5da
[canny.git] / stc / exp / ml_stc_linux_make_v1.0 / include / boost / preprocessor / seq / for_each_i.hpp
1 # /* **************************************************************************\r
2 #  *                                                                          *\r
3 #  *     (C) Copyright Paul Mensonides 2002.\r
4 #  *     Distributed under the Boost Software License, Version 1.0. (See\r
5 #  *     accompanying file LICENSE_1_0.txt or copy at\r
6 #  *     http://www.boost.org/LICENSE_1_0.txt)\r
7 #  *                                                                          *\r
8 #  ************************************************************************** */\r
9 #\r
10 # /* See http://www.boost.org for most recent version. */\r
11 #\r
12 # ifndef BOOST_PREPROCESSOR_SEQ_FOR_EACH_I_HPP\r
13 # define BOOST_PREPROCESSOR_SEQ_FOR_EACH_I_HPP\r
14 #\r
15 # include <boost/preprocessor/arithmetic/dec.hpp>\r
16 # include <boost/preprocessor/arithmetic/inc.hpp>\r
17 # include <boost/preprocessor/config/config.hpp>\r
18 # include <boost/preprocessor/repetition/for.hpp>\r
19 # include <boost/preprocessor/seq/seq.hpp>\r
20 # include <boost/preprocessor/seq/size.hpp>\r
21 # include <boost/preprocessor/tuple/elem.hpp>\r
22 # include <boost/preprocessor/tuple/rem.hpp>\r
23 #\r
24 # /* BOOST_PP_SEQ_FOR_EACH_I */\r
25 #\r
26 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()\r
27 #    define BOOST_PP_SEQ_FOR_EACH_I(macro, data, seq) BOOST_PP_FOR((macro, data, seq (nil), 0), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M)\r
28 # else\r
29 #    define BOOST_PP_SEQ_FOR_EACH_I(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_I(macro, data, seq)\r
30 #    define BOOST_PP_SEQ_FOR_EACH_I_I(macro, data, seq) BOOST_PP_FOR((macro, data, seq (nil), 0), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M)\r
31 # endif\r
32 #\r
33 # define BOOST_PP_SEQ_FOR_EACH_I_P(r, x) BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_PP_TUPLE_ELEM(4, 2, x)))\r
34 #\r
35 # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()\r
36 #    define BOOST_PP_SEQ_FOR_EACH_I_O(r, x) BOOST_PP_SEQ_FOR_EACH_I_O_I x\r
37 # else\r
38 #    define BOOST_PP_SEQ_FOR_EACH_I_O(r, x) BOOST_PP_SEQ_FOR_EACH_I_O_I(BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_TUPLE_ELEM(4, 2, x), BOOST_PP_TUPLE_ELEM(4, 3, x))\r
39 # endif\r
40 #\r
41 # define BOOST_PP_SEQ_FOR_EACH_I_O_I(macro, data, seq, i) (macro, data, BOOST_PP_SEQ_TAIL(seq), BOOST_PP_INC(i))\r
42 #\r
43 # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()\r
44 #    define BOOST_PP_SEQ_FOR_EACH_I_M(r, x) BOOST_PP_SEQ_FOR_EACH_I_M_IM(r, BOOST_PP_TUPLE_REM_4 x)\r
45 #    define BOOST_PP_SEQ_FOR_EACH_I_M_IM(r, im) BOOST_PP_SEQ_FOR_EACH_I_M_I(r, im)\r
46 # else\r
47 #    define BOOST_PP_SEQ_FOR_EACH_I_M(r, x) BOOST_PP_SEQ_FOR_EACH_I_M_I(r, BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_TUPLE_ELEM(4, 2, x), BOOST_PP_TUPLE_ELEM(4, 3, x))\r
48 # endif\r
49 #\r
50 # define BOOST_PP_SEQ_FOR_EACH_I_M_I(r, macro, data, seq, i) macro(r, data, i, BOOST_PP_SEQ_HEAD(seq))\r
51 #\r
52 # /* BOOST_PP_SEQ_FOR_EACH_I_R */\r
53 #\r
54 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()\r
55 #    define BOOST_PP_SEQ_FOR_EACH_I_R(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq (nil), 0), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M)\r
56 # else\r
57 #    define BOOST_PP_SEQ_FOR_EACH_I_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_R_I(r, macro, data, seq)\r
58 #    define BOOST_PP_SEQ_FOR_EACH_I_R_I(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq (nil), 0), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M)\r
59 # endif\r
60 #\r
61 # endif\r