Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:48:52

0001 # /* Copyright (C) 2001
0002 #  * Housemarque Oy
0003 #  * http://www.housemarque.com
0004 #  *
0005 #  * Distributed under the Boost Software License, Version 1.0. (See
0006 #  * accompanying file LICENSE_1_0.txt or copy at
0007 #  * http://www.boost.org/LICENSE_1_0.txt)
0008 #  */
0009 #
0010 # /* Revised by Paul Mensonides (2002) */
0011 #
0012 # /* See http://www.boost.org for most recent version. */
0013 #
0014 # ifndef BOOST_PREPROCESSOR_LIST_TRANSFORM_HPP
0015 # define BOOST_PREPROCESSOR_LIST_TRANSFORM_HPP
0016 #
0017 # include <boost/preprocessor/config/config.hpp>
0018 # include <boost/preprocessor/list/fold_right.hpp>
0019 # include <boost/preprocessor/tuple/elem.hpp>
0020 # include <boost/preprocessor/tuple/rem.hpp>
0021 #
0022 # /* BOOST_PP_LIST_TRANSFORM */
0023 #
0024 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0025 #    define BOOST_PP_LIST_TRANSFORM(op, data, list) BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_LIST_TRANSFORM_O, (op, data, BOOST_PP_NIL), list))
0026 # else
0027 #    define BOOST_PP_LIST_TRANSFORM(op, data, list) BOOST_PP_LIST_TRANSFORM_I(op, data, list)
0028 #    define BOOST_PP_LIST_TRANSFORM_I(op, data, list) BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_LIST_TRANSFORM_O, (op, data, BOOST_PP_NIL), list))
0029 # endif
0030 #
0031 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0032 #    define BOOST_PP_LIST_TRANSFORM_O(d, odr, elem) BOOST_PP_LIST_TRANSFORM_O_D(d, BOOST_PP_TUPLE_ELEM(3, 0, odr), BOOST_PP_TUPLE_ELEM(3, 1, odr), BOOST_PP_TUPLE_ELEM(3, 2, odr), elem)
0033 # else
0034 #    define BOOST_PP_LIST_TRANSFORM_O(d, odr, elem) BOOST_PP_LIST_TRANSFORM_O_I(d, BOOST_PP_TUPLE_REM_3 odr, elem)
0035 #    define BOOST_PP_LIST_TRANSFORM_O_I(d, im, elem) BOOST_PP_LIST_TRANSFORM_O_D(d, im, elem)
0036 # endif
0037 #
0038 # define BOOST_PP_LIST_TRANSFORM_O_D(d, op, data, res, elem) (op, data, (op(d, data, elem), res))
0039 #
0040 # /* BOOST_PP_LIST_TRANSFORM_D */
0041 #
0042 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0043 #    define BOOST_PP_LIST_TRANSFORM_D(d, op, data, list) BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_LIST_FOLD_RIGHT_ ## d(BOOST_PP_LIST_TRANSFORM_O, (op, data, BOOST_PP_NIL), list))
0044 # else
0045 #    define BOOST_PP_LIST_TRANSFORM_D(d, op, data, list) BOOST_PP_LIST_TRANSFORM_D_I(d, op, data, list)
0046 #    define BOOST_PP_LIST_TRANSFORM_D_I(d, op, data, list) BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_LIST_FOLD_RIGHT_ ## d(BOOST_PP_LIST_TRANSFORM_O, (op, data, BOOST_PP_NIL), list))
0047 # endif
0048 #
0049 # endif