1 # /* Copyright (C) 2001
\r
3 # * http://www.housemarque.com
\r
5 # * Distributed under the Boost Software License, Version 1.0. (See
\r
6 # * accompanying file LICENSE_1_0.txt or copy at
\r
7 # * http://www.boost.org/LICENSE_1_0.txt)
\r
10 # /* Revised by Paul Mensonides (2002) */
\r
12 # /* See http://www.boost.org for most recent version. */
\r
14 # ifndef BOOST_PREPROCESSOR_LIST_FOR_EACH_HPP
\r
15 # define BOOST_PREPROCESSOR_LIST_FOR_EACH_HPP
\r
17 # include <boost/preprocessor/config/config.hpp>
\r
18 # include <boost/preprocessor/list/for_each_i.hpp>
\r
19 # include <boost/preprocessor/tuple/elem.hpp>
\r
20 # include <boost/preprocessor/tuple/rem.hpp>
\r
22 # /* BOOST_PP_LIST_FOR_EACH */
\r
24 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
\r
25 # define BOOST_PP_LIST_FOR_EACH(macro, data, list) BOOST_PP_LIST_FOR_EACH_I(BOOST_PP_LIST_FOR_EACH_O, (macro, data), list)
\r
27 # define BOOST_PP_LIST_FOR_EACH(macro, data, list) BOOST_PP_LIST_FOR_EACH_X(macro, data, list)
\r
28 # define BOOST_PP_LIST_FOR_EACH_X(macro, data, list) BOOST_PP_LIST_FOR_EACH_I(BOOST_PP_LIST_FOR_EACH_O, (macro, data), list)
\r
31 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
\r
32 # define BOOST_PP_LIST_FOR_EACH_O(r, md, i, elem) BOOST_PP_LIST_FOR_EACH_O_D(r, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md), elem)
\r
34 # define BOOST_PP_LIST_FOR_EACH_O(r, md, i, elem) BOOST_PP_LIST_FOR_EACH_O_I(r, BOOST_PP_TUPLE_REM_2 md, elem)
\r
35 # define BOOST_PP_LIST_FOR_EACH_O_I(r, im, elem) BOOST_PP_LIST_FOR_EACH_O_D(r, im, elem)
\r
38 # define BOOST_PP_LIST_FOR_EACH_O_D(r, m, d, elem) m(r, d, elem)
\r
40 # /* BOOST_PP_LIST_FOR_EACH_R */
\r
42 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
\r
43 # define BOOST_PP_LIST_FOR_EACH_R(r, macro, data, list) BOOST_PP_LIST_FOR_EACH_I_R(r, BOOST_PP_LIST_FOR_EACH_O, (macro, data), list)
\r
45 # define BOOST_PP_LIST_FOR_EACH_R(r, macro, data, list) BOOST_PP_LIST_FOR_EACH_R_X(r, macro, data, list)
\r
46 # define BOOST_PP_LIST_FOR_EACH_R_X(r, macro, data, list) BOOST_PP_LIST_FOR_EACH_I_R(r, BOOST_PP_LIST_FOR_EACH_O, (macro, data), list)
\r