]> git.lyx.org Git - lyx.git/blob - boost/boost/preprocessor/seq/for_each.hpp
MathML for InsetMathBoldSymbol.
[lyx.git] / boost / boost / preprocessor / seq / for_each.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_HPP\r
13 # define BOOST_PREPROCESSOR_SEQ_FOR_EACH_HPP\r
14 #\r
15 # include <boost/preprocessor/arithmetic/dec.hpp>\r
16 # include <boost/preprocessor/config/config.hpp>\r
17 # include <boost/preprocessor/repetition/for.hpp>\r
18 # include <boost/preprocessor/seq/seq.hpp>\r
19 # include <boost/preprocessor/seq/size.hpp>\r
20 # include <boost/preprocessor/tuple/elem.hpp>\r
21 # include <boost/preprocessor/tuple/rem.hpp>\r
22 #\r
23 # /* BOOST_PP_SEQ_FOR_EACH */\r
24 #\r
25 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()\r
26 #    define BOOST_PP_SEQ_FOR_EACH(macro, data, seq) BOOST_PP_FOR((macro, data, seq (nil)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M)\r
27 # else\r
28 #    define BOOST_PP_SEQ_FOR_EACH(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_D(macro, data, seq)\r
29 #    define BOOST_PP_SEQ_FOR_EACH_D(macro, data, seq) BOOST_PP_FOR((macro, data, seq (nil)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M)\r
30 # endif\r
31 #\r
32 # define BOOST_PP_SEQ_FOR_EACH_P(r, x) BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_PP_TUPLE_ELEM(3, 2, x)))\r
33 #\r
34 # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()\r
35 #    define BOOST_PP_SEQ_FOR_EACH_O(r, x) BOOST_PP_SEQ_FOR_EACH_O_I x\r
36 # else\r
37 #    define BOOST_PP_SEQ_FOR_EACH_O(r, x) BOOST_PP_SEQ_FOR_EACH_O_I(BOOST_PP_TUPLE_ELEM(3, 0, x), BOOST_PP_TUPLE_ELEM(3, 1, x), BOOST_PP_TUPLE_ELEM(3, 2, x))\r
38 # endif\r
39 #\r
40 # define BOOST_PP_SEQ_FOR_EACH_O_I(macro, data, seq) (macro, data, BOOST_PP_SEQ_TAIL(seq))\r
41 #\r
42 # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()\r
43 #    define BOOST_PP_SEQ_FOR_EACH_M(r, x) BOOST_PP_SEQ_FOR_EACH_M_IM(r, BOOST_PP_TUPLE_REM_3 x)\r
44 #    define BOOST_PP_SEQ_FOR_EACH_M_IM(r, im) BOOST_PP_SEQ_FOR_EACH_M_I(r, im)\r
45 # else\r
46 #    define BOOST_PP_SEQ_FOR_EACH_M(r, x) BOOST_PP_SEQ_FOR_EACH_M_I(r, BOOST_PP_TUPLE_ELEM(3, 0, x), BOOST_PP_TUPLE_ELEM(3, 1, x), BOOST_PP_TUPLE_ELEM(3, 2, x))\r
47 # endif\r
48 #\r
49 # define BOOST_PP_SEQ_FOR_EACH_M_I(r, macro, data, seq) macro(r, data, BOOST_PP_SEQ_HEAD(seq))\r
50 #\r
51 # /* BOOST_PP_SEQ_FOR_EACH_R */\r
52 #\r
53 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()\r
54 #    define BOOST_PP_SEQ_FOR_EACH_R(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq (nil)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M)\r
55 # else\r
56 #    define BOOST_PP_SEQ_FOR_EACH_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_R_I(r, macro, data, seq)\r
57 #    define BOOST_PP_SEQ_FOR_EACH_R_I(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq (nil)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M)\r
58 # endif\r
59 #\r
60 # endif\r