MessagePack for C++
rest_n.hpp
Go to the documentation of this file.
1 # /* **************************************************************************
2 # * *
3 # * (C) Copyright Paul Mensonides 2002.
4 # * Distributed under the Boost Software License, Version 1.0. (See
5 # * accompanying file LICENSE_1_0.txt or copy at
6 # * http://www.boost.org/LICENSE_1_0.txt)
7 # * *
8 # ************************************************************************** */
9 #
10 # /* See http://www.boost.org for most recent version. */
11 #
12 # ifndef MSGPACK_PREPROCESSOR_SEQ_REST_N_HPP
13 # define MSGPACK_PREPROCESSOR_SEQ_REST_N_HPP
14 #
24 #
25 # /* MSGPACK_PP_SEQ_REST_N */
26 #
27 # if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
28 # define MSGPACK_PP_SEQ_REST_N(n, seq) MSGPACK_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, MSGPACK_PP_SEQ_DETAIL_EMPTY_SIZE(seq))
29 # else
30 # define MSGPACK_PP_SEQ_REST_N(n, seq) MSGPACK_PP_SEQ_REST_N_I(n, seq)
31 # define MSGPACK_PP_SEQ_REST_N_I(n, seq) MSGPACK_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, MSGPACK_PP_SEQ_DETAIL_EMPTY_SIZE(seq))
32 # endif
33 #
34 # define MSGPACK_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, size) \
35  MSGPACK_PP_EXPR_IIF \
36  ( \
37  MSGPACK_PP_BITAND \
38  ( \
39  MSGPACK_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(size), \
40  MSGPACK_PP_NOT_EQUAL(n,size) \
41  ), \
42  MSGPACK_PP_TUPLE_ELEM(2, 1, MSGPACK_PP_SEQ_SPLIT(MSGPACK_PP_INC(n), MSGPACK_PP_IDENTITY( (nil) seq )))() \
43  ) \
44 
45 #
46 # endif