File indexing completed on 2025-01-18 09:49:28
0001 #
0002
0003
0004
0005
0006
0007
0008
0009 #
0010 #
0011 #
0012 # ifndef BOOST_PREPROCESSOR_SEQ_REST_N_HPP
0013 # define BOOST_PREPROCESSOR_SEQ_REST_N_HPP
0014 #
0015 # include <boost/preprocessor/arithmetic/inc.hpp>
0016 # include <boost/preprocessor/comparison/not_equal.hpp>
0017 # include <boost/preprocessor/config/config.hpp>
0018 # include <boost/preprocessor/control/iif.hpp>
0019 # include <boost/preprocessor/facilities/identity.hpp>
0020 # include <boost/preprocessor/logical/bitand.hpp>
0021 # include <boost/preprocessor/seq/detail/is_empty.hpp>
0022 # include <boost/preprocessor/seq/detail/split.hpp>
0023 # include <boost/preprocessor/tuple/elem.hpp>
0024 #
0025 #
0026 #
0027 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
0028 # define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, BOOST_PP_SEQ_DETAIL_EMPTY_SIZE(seq))
0029 # else
0030 # define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_SEQ_REST_N_I(n, seq)
0031 # define BOOST_PP_SEQ_REST_N_I(n, seq) BOOST_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, BOOST_PP_SEQ_DETAIL_EMPTY_SIZE(seq))
0032 # endif
0033 #
0034 # define BOOST_PP_SEQ_REST_N_DETAIL_EXEC_NO_MATCH(n, seq)
0035 # define BOOST_PP_SEQ_REST_N_DETAIL_EXEC_MATCH(n, seq) \
0036 BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), BOOST_PP_IDENTITY( (nil) seq )))() \
0037
0038 # define BOOST_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, size) \
0039 BOOST_PP_IIF \
0040 ( \
0041 BOOST_PP_BITAND \
0042 ( \
0043 BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(size), \
0044 BOOST_PP_NOT_EQUAL(n,size) \
0045 ), \
0046 BOOST_PP_SEQ_REST_N_DETAIL_EXEC_MATCH, \
0047 BOOST_PP_SEQ_REST_N_DETAIL_EXEC_NO_MATCH \
0048 ) \
0049 (n, seq) \
0050
0051 #
0052 # endif