1
# /* **************************************************************************
3
# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, *
4
# * modify, sell, and distribute this software is granted provided *
5
# * this copyright notice appears in all copies. This software is *
6
# * provided "as is" without express or implied warranty, and with *
7
# * no claim at to its suitability for any purpose. *
9
# ************************************************************************** */
11
# /* See http://www.boost.org for most recent version. */
13
# ifndef BOOST_PREPROCESSOR_ARRAY_POP_BACK_HPP
14
# define BOOST_PREPROCESSOR_ARRAY_POP_BACK_HPP
16
# include <boost/preprocessor/arithmetic/dec.hpp>
17
# include <boost/preprocessor/array/elem.hpp>
18
# include <boost/preprocessor/array/size.hpp>
19
# include <boost/preprocessor/repetition/enum.hpp>
20
# include <boost/preprocessor/repetition/deduce_z.hpp>
22
# /* BOOST_PP_ARRAY_POP_BACK */
24
# define BOOST_PP_ARRAY_POP_BACK(array) BOOST_PP_ARRAY_POP_BACK_Z(BOOST_PP_DEDUCE_Z(), array)
26
# /* BOOST_PP_ARRAY_POP_BACK_Z */
28
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
29
# define BOOST_PP_ARRAY_POP_BACK_Z(z, array) BOOST_PP_ARRAY_POP_BACK_I(z, BOOST_PP_ARRAY_SIZE(array), array)
31
# define BOOST_PP_ARRAY_POP_BACK_Z(z, array) BOOST_PP_ARRAY_POP_BACK_Z_D(z, array)
32
# define BOOST_PP_ARRAY_POP_BACK_Z_D(z, array) BOOST_PP_ARRAY_POP_BACK_I(z, BOOST_PP_ARRAY_SIZE(array), array)
35
# define BOOST_PP_ARRAY_POP_BACK_I(z, size, array) (BOOST_PP_DEC(size), (BOOST_PP_ENUM_ ## z(BOOST_PP_DEC(size), BOOST_PP_ARRAY_POP_BACK_M, array)))
36
# define BOOST_PP_ARRAY_POP_BACK_M(z, n, data) BOOST_PP_ARRAY_ELEM(n, data)