2002-10-13 06:11:19 +00:00
|
|
|
# /* **************************************************************************
|
|
|
|
# * *
|
2004-07-27 03:43:34 +00:00
|
|
|
# * (C) Copyright Paul Mensonides 2002.
|
|
|
|
# * Distributed under the Boost Software License, Version 1.0. (See
|
|
|
|
# * accompanying file LICENSE_1_0.txt or copy at
|
|
|
|
# * http://www.boost.org/LICENSE_1_0.txt)
|
2002-10-13 06:11:19 +00:00
|
|
|
# * *
|
|
|
|
# ************************************************************************** */
|
|
|
|
#
|
|
|
|
# /* See http://www.boost.org for most recent version. */
|
|
|
|
#
|
2002-11-07 23:16:43 +00:00
|
|
|
# ifndef BOOST_PREPROCESSOR_SEQ_REST_N_HPP
|
|
|
|
# define BOOST_PREPROCESSOR_SEQ_REST_N_HPP
|
2002-10-13 06:11:19 +00:00
|
|
|
#
|
2002-11-07 23:16:43 +00:00
|
|
|
# include <boost/preprocessor/arithmetic/inc.hpp>
|
2015-07-17 07:16:11 -04:00
|
|
|
# include <boost/preprocessor/comparison/not_equal.hpp>
|
2002-10-13 06:11:19 +00:00
|
|
|
# include <boost/preprocessor/config/config.hpp>
|
2020-05-04 18:44:20 -04:00
|
|
|
# include <boost/preprocessor/control/iif.hpp>
|
2014-05-26 16:36:30 -04:00
|
|
|
# include <boost/preprocessor/facilities/identity.hpp>
|
2015-05-29 01:36:06 -04:00
|
|
|
# include <boost/preprocessor/logical/bitand.hpp>
|
|
|
|
# include <boost/preprocessor/seq/detail/is_empty.hpp>
|
2002-11-07 23:16:43 +00:00
|
|
|
# include <boost/preprocessor/seq/detail/split.hpp>
|
|
|
|
# include <boost/preprocessor/tuple/elem.hpp>
|
2002-10-13 06:11:19 +00:00
|
|
|
#
|
2002-11-07 23:16:43 +00:00
|
|
|
# /* BOOST_PP_SEQ_REST_N */
|
2002-10-13 06:11:19 +00:00
|
|
|
#
|
|
|
|
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
2015-05-29 01:36:06 -04:00
|
|
|
# define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, BOOST_PP_SEQ_DETAIL_EMPTY_SIZE(seq))
|
2002-10-13 06:11:19 +00:00
|
|
|
# else
|
2002-11-07 23:16:43 +00:00
|
|
|
# define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_SEQ_REST_N_I(n, seq)
|
2015-05-29 01:36:06 -04:00
|
|
|
# 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))
|
2002-10-13 06:11:19 +00:00
|
|
|
# endif
|
|
|
|
#
|
2020-05-04 18:44:20 -04:00
|
|
|
# define BOOST_PP_SEQ_REST_N_DETAIL_EXEC_NO_MATCH(n, seq)
|
|
|
|
# define BOOST_PP_SEQ_REST_N_DETAIL_EXEC_MATCH(n, seq) \
|
|
|
|
BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), BOOST_PP_IDENTITY( (nil) seq )))() \
|
|
|
|
/**/
|
2015-05-29 01:36:06 -04:00
|
|
|
# define BOOST_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, size) \
|
2020-05-04 18:44:20 -04:00
|
|
|
BOOST_PP_IIF \
|
2019-08-27 01:29:21 -04:00
|
|
|
( \
|
|
|
|
BOOST_PP_BITAND \
|
|
|
|
( \
|
|
|
|
BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(size), \
|
|
|
|
BOOST_PP_NOT_EQUAL(n,size) \
|
|
|
|
), \
|
2020-05-04 18:44:20 -04:00
|
|
|
BOOST_PP_SEQ_REST_N_DETAIL_EXEC_MATCH, \
|
|
|
|
BOOST_PP_SEQ_REST_N_DETAIL_EXEC_NO_MATCH \
|
2019-08-27 01:29:21 -04:00
|
|
|
) \
|
2020-05-04 18:44:20 -04:00
|
|
|
(n, seq) \
|
2015-05-29 01:36:06 -04:00
|
|
|
/**/
|
|
|
|
#
|
2002-10-13 06:11:19 +00:00
|
|
|
# endif
|