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_ARRAY_POP_FRONT_HPP
13# define MSGPACK_PREPROCESSOR_ARRAY_POP_FRONT_HPP
14#
15# include <msgpack/preprocessor/arithmetic/dec.hpp>
16# include <msgpack/preprocessor/arithmetic/inc.hpp>
17# include <msgpack/preprocessor/array/elem.hpp>
18# include <msgpack/preprocessor/array/size.hpp>
19# include <msgpack/preprocessor/repetition/enum.hpp>
20# include <msgpack/preprocessor/repetition/deduce_z.hpp>
21#
22# /* MSGPACK_PP_ARRAY_POP_FRONT */
23#
24# define MSGPACK_PP_ARRAY_POP_FRONT(array) MSGPACK_PP_ARRAY_POP_FRONT_Z(MSGPACK_PP_DEDUCE_Z(), array)
25#
26# /* MSGPACK_PP_ARRAY_POP_FRONT_Z */
27#
28# if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
29#    define MSGPACK_PP_ARRAY_POP_FRONT_Z(z, array) MSGPACK_PP_ARRAY_POP_FRONT_I(z, MSGPACK_PP_ARRAY_SIZE(array), array)
30# else
31#    define MSGPACK_PP_ARRAY_POP_FRONT_Z(z, array) MSGPACK_PP_ARRAY_POP_FRONT_Z_D(z, array)
32#    define MSGPACK_PP_ARRAY_POP_FRONT_Z_D(z, array) MSGPACK_PP_ARRAY_POP_FRONT_I(z, MSGPACK_PP_ARRAY_SIZE(array), array)
33# endif
34#
35# define MSGPACK_PP_ARRAY_POP_FRONT_I(z, size, array) (MSGPACK_PP_DEC(size), (MSGPACK_PP_ENUM_ ## z(MSGPACK_PP_DEC(size), MSGPACK_PP_ARRAY_POP_FRONT_M, array)))
36# define MSGPACK_PP_ARRAY_POP_FRONT_M(z, n, data) MSGPACK_PP_ARRAY_ELEM(MSGPACK_PP_INC(n), data)
37#
38# endif
39