Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 1 | # /* 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 | # |
| 14 | # ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_SHIFTED_PARAMS_HPP |
| 15 | # define BOOST_PREPROCESSOR_REPETITION_ENUM_SHIFTED_PARAMS_HPP |
| 16 | # |
| 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 | # |
| 24 | # /* BOOST_PP_ENUM_SHIFTED_PARAMS */ |
| 25 | # |
| 26 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() |
| 27 | # define BOOST_PP_ENUM_SHIFTED_PARAMS(count, param) BOOST_PP_REPEAT(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) |
| 28 | # else |
| 29 | # define BOOST_PP_ENUM_SHIFTED_PARAMS(count, param) BOOST_PP_ENUM_SHIFTED_PARAMS_I(count, param) |
| 30 | # define BOOST_PP_ENUM_SHIFTED_PARAMS_I(count, param) BOOST_PP_REPEAT(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) |
| 31 | # endif |
| 32 | # |
| 33 | # define BOOST_PP_ENUM_SHIFTED_PARAMS_M(z, n, param) BOOST_PP_COMMA_IF(n) BOOST_PP_CAT(param, BOOST_PP_INC(n)) |
| 34 | # |
| 35 | # /* BOOST_PP_ENUM_SHIFTED_PARAMS_Z */ |
| 36 | # |
| 37 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() |
| 38 | # define BOOST_PP_ENUM_SHIFTED_PARAMS_Z(z, count, param) BOOST_PP_REPEAT_ ## z(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) |
| 39 | # else |
| 40 | # define BOOST_PP_ENUM_SHIFTED_PARAMS_Z(z, count, param) BOOST_PP_ENUM_SHIFTED_PARAMS_Z_I(z, count, param) |
| 41 | # define BOOST_PP_ENUM_SHIFTED_PARAMS_Z_I(z, count, param) BOOST_PP_REPEAT_ ## z(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) |
| 42 | # endif |
| 43 | # |
| 44 | # endif |