Back to home page

EIC code displayed by LXR

 
 

    


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

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_FILTER_HPP
0013 # define BOOST_PREPROCESSOR_SEQ_FILTER_HPP
0014 #
0015 # include <boost/preprocessor/config/config.hpp>
0016 # include <boost/preprocessor/control/expr_if.hpp>
0017 # include <boost/preprocessor/facilities/empty.hpp>
0018 # include <boost/preprocessor/seq/fold_left.hpp>
0019 # include <boost/preprocessor/seq/seq.hpp>
0020 # include <boost/preprocessor/tuple/elem.hpp>
0021 # include <boost/preprocessor/tuple/rem.hpp>
0022 #
0023 # /* BOOST_PP_SEQ_FILTER */
0024 #
0025 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0026 #    define BOOST_PP_SEQ_FILTER(pred, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_FILTER_O, (pred, data, (nil)), seq)))
0027 # else
0028 #    define BOOST_PP_SEQ_FILTER(pred, data, seq) BOOST_PP_SEQ_FILTER_I(pred, data, seq)
0029 #    define BOOST_PP_SEQ_FILTER_I(pred, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_FILTER_O, (pred, data, (nil)), seq)))
0030 # endif
0031 #
0032 # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
0033 #    define BOOST_PP_SEQ_FILTER_O(s, st, elem) BOOST_PP_SEQ_FILTER_O_IM(s, BOOST_PP_TUPLE_REM_3 st, elem)
0034 #    define BOOST_PP_SEQ_FILTER_O_IM(s, im, elem) BOOST_PP_SEQ_FILTER_O_I(s, im, elem)
0035 # else
0036 #    define BOOST_PP_SEQ_FILTER_O(s, st, elem) BOOST_PP_SEQ_FILTER_O_I(s, BOOST_PP_TUPLE_ELEM(3, 0, st), BOOST_PP_TUPLE_ELEM(3, 1, st), BOOST_PP_TUPLE_ELEM(3, 2, st), elem)
0037 # endif
0038 #
0039 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC()
0040 #   define BOOST_PP_SEQ_FILTER_O_I(s, pred, data, res, elem) (pred, data, res BOOST_PP_EXPR_IF(pred(s, data, elem), (elem)))
0041 # else
0042 #   define BOOST_PP_SEQ_FILTER_O_I(s, pred, data, res, elem) (pred, data, res BOOST_PP_EXPR_IF(pred##(s, data, elem), (elem)))
0043 # endif
0044 #
0045 # /* BOOST_PP_SEQ_FILTER_S */
0046 #
0047 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0048 #    define BOOST_PP_SEQ_FILTER_S(s, pred, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_FILTER_O, (pred, data, (nil)), seq)))
0049 # else
0050 #    define BOOST_PP_SEQ_FILTER_S(s, pred, data, seq) BOOST_PP_SEQ_FILTER_S_I(s, pred, data, seq)
0051 #    define BOOST_PP_SEQ_FILTER_S_I(s, pred, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_FILTER_O, (pred, data, (nil)), seq)))
0052 # endif
0053 #
0054 # endif