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_REPLACE_HPP
0013 # define BOOST_PREPROCESSOR_SEQ_REPLACE_HPP
0014 #
0015 # include <boost/preprocessor/arithmetic/dec.hpp>
0016 # include <boost/preprocessor/arithmetic/inc.hpp>
0017 # include <boost/preprocessor/config/config.hpp>
0018 # include <boost/preprocessor/comparison/equal.hpp>
0019 # include <boost/preprocessor/control/iif.hpp>
0020 # include <boost/preprocessor/seq/first_n.hpp>
0021 # include <boost/preprocessor/seq/rest_n.hpp>
0022 # include <boost/preprocessor/seq/size.hpp>
0023 #
0024 # /* BOOST_PP_SEQ_REPLACE */
0025 #
0026 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0027 #    define BOOST_PP_SEQ_REPLACE(seq, i, elem) BOOST_PP_SEQ_FIRST_N(i, seq) (elem) BOOST_PP_SEQ_REPLACE_DETAIL_REST(seq, i)
0028 # else
0029 #    define BOOST_PP_SEQ_REPLACE(seq, i, elem) BOOST_PP_SEQ_REPLACE_I(seq, i, elem)
0030 #    define BOOST_PP_SEQ_REPLACE_I(seq, i, elem) BOOST_PP_SEQ_FIRST_N(i, seq) (elem) BOOST_PP_SEQ_REPLACE_DETAIL_REST(seq, i)
0031 # endif
0032 #
0033 #    define BOOST_PP_SEQ_REPLACE_DETAIL_REST_EMPTY(seq, i)
0034 #    define BOOST_PP_SEQ_REPLACE_DETAIL_REST_VALID(seq, i) BOOST_PP_SEQ_REST_N(BOOST_PP_INC(i), seq)
0035 #    define BOOST_PP_SEQ_REPLACE_DETAIL_REST(seq, i) \
0036         BOOST_PP_IIF \
0037             ( \
0038             BOOST_PP_EQUAL(i,BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq))), \
0039             BOOST_PP_SEQ_REPLACE_DETAIL_REST_EMPTY, \
0040             BOOST_PP_SEQ_REPLACE_DETAIL_REST_VALID \
0041             ) \
0042         (seq, i) \
0043 /**/
0044 #
0045 # endif