blob: b81af02cb68ef4614548d9989011ef53bb7b9d46 [file] [log] [blame]
Jeff Thompsona28eed82013-08-22 16:21:10 -07001# /* Copyright (C) 2001
2# * Housemarque Oy
3# * http://www.housemarque.com
4# *
5# * Distributed under the Boost Software License, Version 1.0. (See
6# * accompanying file LICENSE_1_0.txt or copy at
7# * http://www.boost.org/LICENSE_1_0.txt)
8# */
9#
10# /* Revised by Paul Mensonides (2002) */
11#
12# /* See http://www.boost.org for most recent version. */
13#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070014# ifndef NDNBOOST_PREPROCESSOR_REPETITION_ENUM_SHIFTED_PARAMS_HPP
15# define NDNBOOST_PREPROCESSOR_REPETITION_ENUM_SHIFTED_PARAMS_HPP
Jeff Thompsona28eed82013-08-22 16:21:10 -070016#
17# include <ndnboost/preprocessor/arithmetic/dec.hpp>
18# include <ndnboost/preprocessor/arithmetic/inc.hpp>
19# include <ndnboost/preprocessor/cat.hpp>
20# include <ndnboost/preprocessor/config/config.hpp>
21# include <ndnboost/preprocessor/punctuation/comma_if.hpp>
22# include <ndnboost/preprocessor/repetition/repeat.hpp>
23#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070024# /* NDNBOOST_PP_ENUM_SHIFTED_PARAMS */
Jeff Thompsona28eed82013-08-22 16:21:10 -070025#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070026# if ~NDNBOOST_PP_CONFIG_FLAGS() & NDNBOOST_PP_CONFIG_EDG()
27# define NDNBOOST_PP_ENUM_SHIFTED_PARAMS(count, param) NDNBOOST_PP_REPEAT(NDNBOOST_PP_DEC(count), NDNBOOST_PP_ENUM_SHIFTED_PARAMS_M, param)
Jeff Thompsona28eed82013-08-22 16:21:10 -070028# else
Jeff Thompson3d613fd2013-10-15 15:39:04 -070029# define NDNBOOST_PP_ENUM_SHIFTED_PARAMS(count, param) NDNBOOST_PP_ENUM_SHIFTED_PARAMS_I(count, param)
30# define NDNBOOST_PP_ENUM_SHIFTED_PARAMS_I(count, param) NDNBOOST_PP_REPEAT(NDNBOOST_PP_DEC(count), NDNBOOST_PP_ENUM_SHIFTED_PARAMS_M, param)
Jeff Thompsona28eed82013-08-22 16:21:10 -070031# endif
32#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070033# define NDNBOOST_PP_ENUM_SHIFTED_PARAMS_M(z, n, param) NDNBOOST_PP_COMMA_IF(n) NDNBOOST_PP_CAT(param, NDNBOOST_PP_INC(n))
Jeff Thompsona28eed82013-08-22 16:21:10 -070034#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070035# /* NDNBOOST_PP_ENUM_SHIFTED_PARAMS_Z */
Jeff Thompsona28eed82013-08-22 16:21:10 -070036#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070037# if ~NDNBOOST_PP_CONFIG_FLAGS() & NDNBOOST_PP_CONFIG_EDG()
38# define NDNBOOST_PP_ENUM_SHIFTED_PARAMS_Z(z, count, param) NDNBOOST_PP_REPEAT_ ## z(NDNBOOST_PP_DEC(count), NDNBOOST_PP_ENUM_SHIFTED_PARAMS_M, param)
Jeff Thompsona28eed82013-08-22 16:21:10 -070039# else
Jeff Thompson3d613fd2013-10-15 15:39:04 -070040# define NDNBOOST_PP_ENUM_SHIFTED_PARAMS_Z(z, count, param) NDNBOOST_PP_ENUM_SHIFTED_PARAMS_Z_I(z, count, param)
41# define NDNBOOST_PP_ENUM_SHIFTED_PARAMS_Z_I(z, count, param) NDNBOOST_PP_REPEAT_ ## z(NDNBOOST_PP_DEC(count), NDNBOOST_PP_ENUM_SHIFTED_PARAMS_M, param)
Jeff Thompsona28eed82013-08-22 16:21:10 -070042# endif
43#
44# endif