blob: 3dd767748616bdcee543b1e828779ac3f93a811d [file] [log] [blame]
Jeff Thompsonf7d49942013-08-01 16:47:40 -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_PARAMS_HPP
15# define NDNBOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_HPP
Jeff Thompsonf7d49942013-08-01 16:47:40 -070016#
Jeff Thompson2277ce52013-08-01 17:34:11 -070017# include <ndnboost/preprocessor/config/config.hpp>
18# include <ndnboost/preprocessor/punctuation/comma_if.hpp>
19# include <ndnboost/preprocessor/repetition/repeat.hpp>
Jeff Thompsonf7d49942013-08-01 16:47:40 -070020#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070021# /* NDNBOOST_PP_ENUM_PARAMS */
Jeff Thompsonf7d49942013-08-01 16:47:40 -070022#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070023# if ~NDNBOOST_PP_CONFIG_FLAGS() & NDNBOOST_PP_CONFIG_EDG()
24# define NDNBOOST_PP_ENUM_PARAMS(count, param) NDNBOOST_PP_REPEAT(count, NDNBOOST_PP_ENUM_PARAMS_M, param)
Jeff Thompsonf7d49942013-08-01 16:47:40 -070025# else
Jeff Thompson3d613fd2013-10-15 15:39:04 -070026# define NDNBOOST_PP_ENUM_PARAMS(count, param) NDNBOOST_PP_ENUM_PARAMS_I(count, param)
27# define NDNBOOST_PP_ENUM_PARAMS_I(count, param) NDNBOOST_PP_REPEAT(count, NDNBOOST_PP_ENUM_PARAMS_M, param)
Jeff Thompsonf7d49942013-08-01 16:47:40 -070028# endif
29#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070030# define NDNBOOST_PP_ENUM_PARAMS_M(z, n, param) NDNBOOST_PP_COMMA_IF(n) param ## n
Jeff Thompsonf7d49942013-08-01 16:47:40 -070031#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070032# /* NDNBOOST_PP_ENUM_PARAMS_Z */
Jeff Thompsonf7d49942013-08-01 16:47:40 -070033#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070034# if ~NDNBOOST_PP_CONFIG_FLAGS() & NDNBOOST_PP_CONFIG_EDG()
35# define NDNBOOST_PP_ENUM_PARAMS_Z(z, count, param) NDNBOOST_PP_REPEAT_ ## z(count, NDNBOOST_PP_ENUM_PARAMS_M, param)
Jeff Thompsonf7d49942013-08-01 16:47:40 -070036# else
Jeff Thompson3d613fd2013-10-15 15:39:04 -070037# define NDNBOOST_PP_ENUM_PARAMS_Z(z, count, param) NDNBOOST_PP_ENUM_PARAMS_Z_I(z, count, param)
38# define NDNBOOST_PP_ENUM_PARAMS_Z_I(z, count, param) NDNBOOST_PP_REPEAT_ ## z(count, NDNBOOST_PP_ENUM_PARAMS_M, param)
Jeff Thompsonf7d49942013-08-01 16:47:40 -070039# endif
40#
41# endif