Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:49:28

0001 # /* **************************************************************************
0002 #  *                                                                          *
0003 #  *     (C) Copyright Paul Mensonides 2002.
0004 #  *     Distributed under the Boost Software License, Version 1.0. (See
0005 #  *     accompanying file LICENSE_1_0.txt or copy at
0006 #  *     http://www.boost.org/LICENSE_1_0.txt)
0007 #  *                                                                          *
0008 #  ************************************************************************** */
0009 #
0010 # /* See http://www.boost.org for most recent version. */
0011 #
0012 # ifndef BOOST_PREPROCESSOR_SEQ_TRANSFORM_HPP
0013 # define BOOST_PREPROCESSOR_SEQ_TRANSFORM_HPP
0014 #
0015 # include <boost/preprocessor/config/config.hpp>
0016 # include <boost/preprocessor/seq/fold_left.hpp>
0017 # include <boost/preprocessor/seq/seq.hpp>
0018 # include <boost/preprocessor/tuple/elem.hpp>
0019 # include <boost/preprocessor/tuple/rem.hpp>
0020 #
0021 # /* BOOST_PP_SEQ_TRANSFORM */
0022 #
0023 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0024 #    define BOOST_PP_SEQ_TRANSFORM(op, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_TRANSFORM_O, (op, data, (nil)), seq)))
0025 # else
0026 #    define BOOST_PP_SEQ_TRANSFORM(op, data, seq) BOOST_PP_SEQ_TRANSFORM_I(op, data, seq)
0027 #    define BOOST_PP_SEQ_TRANSFORM_I(op, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_TRANSFORM_O, (op, data, (nil)), seq)))
0028 # endif
0029 #
0030 # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
0031 #    define BOOST_PP_SEQ_TRANSFORM_O(s, state, elem) BOOST_PP_SEQ_TRANSFORM_O_IM(s, BOOST_PP_TUPLE_REM_3 state, elem)
0032 #    define BOOST_PP_SEQ_TRANSFORM_O_IM(s, im, elem) BOOST_PP_SEQ_TRANSFORM_O_I(s, im, elem)
0033 # else
0034 #    define BOOST_PP_SEQ_TRANSFORM_O(s, state, elem) BOOST_PP_SEQ_TRANSFORM_O_I(s, BOOST_PP_TUPLE_ELEM(3, 0, state), BOOST_PP_TUPLE_ELEM(3, 1, state), BOOST_PP_TUPLE_ELEM(3, 2, state), elem)
0035 # endif
0036 #
0037 # define BOOST_PP_SEQ_TRANSFORM_O_I(s, op, data, res, elem) (op, data, res (op(s, data, elem)))
0038 #
0039 # /* BOOST_PP_SEQ_TRANSFORM_S */
0040 #
0041 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0042 #    define BOOST_PP_SEQ_TRANSFORM_S(s, op, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_TRANSFORM_O, (op, data, (nil)), seq)))
0043 # else
0044 #    define BOOST_PP_SEQ_TRANSFORM_S(s, op, data, seq) BOOST_PP_SEQ_TRANSFORM_S_I(s, op, data, seq)
0045 #    define BOOST_PP_SEQ_TRANSFORM_S_I(s, op, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_TRANSFORM_O, (op, data, (nil)), seq)))
0046 # endif
0047 #
0048 # endif