Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-03-30 08:13:47

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 ">#
0011 # /* See http://www.boost.org for most recent version. */
0012 0013 ">#
0014 # ifndef BOOST_PREPROCESSOR_SEQ_FILTER_HPP
0015 # define BOOST_PREPROCESSOR_SEQ_FILTER_HPP
0016 0017 ">#
0018 # include <boost/preprocessor/config/config.hpp>
0019 # include <boost/preprocessor/control/expr_if.hpp>
0020 # include <boost/preprocessor/facilities/empty.hpp>
0021 # include <boost/preprocessor/seq/fold_left.hpp>
0022 # include <boost/preprocessor/seq/seq.hpp>
0023 # include <boost/preprocessor/tuple/elem.hpp>
0024 # include <boost/preprocessor/tuple/rem.hpp>
0025 0026 ">#
0027 # /* BOOST_PP_SEQ_FILTER */
0028 0029 ">#
0030 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0031 #    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)))
0032 # else
0033 #    define BOOST_PP_SEQ_FILTER(pred, data, seq) BOOST_PP_SEQ_FILTER_I(pred, data, seq)
0034 #    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)))
0035 # endif
0036 0037 ">#
0038 # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
0039 #    define BOOST_PP_SEQ_FILTER_O(s, st, elem) BOOST_PP_SEQ_FILTER_O_IM(s, BOOST_PP_TUPLE_REM_3 st, elem)
0040 #    define BOOST_PP_SEQ_FILTER_O_IM(s, im, elem) BOOST_PP_SEQ_FILTER_O_I(s, im, elem)
0041 # else
0042 #    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)
0043 # endif
0044 0045 ">#
0046 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC()
0047 #   define BOOST_PP_SEQ_FILTER_O_I(s, pred, data, res, elem) (pred, data, res BOOST_PP_EXPR_IF(pred(s, data, elem), (elem)))
0048 # else
0049 #   define BOOST_PP_SEQ_FILTER_O_I(s, pred, data, res, elem) (pred, data, res BOOST_PP_EXPR_IF(pred##(s, data, elem), (elem)))
0050 # endif
0051 0052 ">#
0053 # /* BOOST_PP_SEQ_FILTER_S */
0054 0055 ">#
0056 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0057 #    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)))
0058 # else
0059 #    define BOOST_PP_SEQ_FILTER_S(s, pred, data, seq) BOOST_PP_SEQ_FILTER_S_I(s, pred, data, seq)
0060 #    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)))
0061 # endif
0062 0063 ">#
0064 # endif