1
//-----------------------------------------------------------------------------
2
// boost mpl/aux_/preprocessor/ext_params.hpp header file
3
// See http://www.boost.org for updates, documentation, and revision history.
4
//-----------------------------------------------------------------------------
6
// Copyright (c) 2000-02
9
// Permission to use, copy, modify, distribute and sell this software
10
// and its documentation for any purpose is hereby granted without fee,
11
// provided that the above copyright notice appears in all copies and
12
// that both the copyright notice and this permission notice appear in
13
// supporting documentation. No representations are made about the
14
// suitability of this software for any purpose. It is provided "as is"
15
// without express or implied warranty.
17
#ifndef BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED
18
#define BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED
20
#include "boost/mpl/aux_/config/preprocessor.hpp"
22
// BOOST_MPL_PP_EXT_PARAMS(1,1,T): <nothing>
23
// BOOST_MPL_PP_EXT_PARAMS(1,2,T): T1
24
// BOOST_MPL_PP_EXT_PARAMS(1,3,T): T1, T2
25
// BOOST_MPL_PP_EXT_PARAMS(1,n,T): T1, T2, .., Tn-1
27
#if !defined(BOOST_MPL_NO_OWN_PP_PRIMITIVES)
29
# include "boost/mpl/aux_/preprocessor/filter_params.hpp"
30
# include "boost/mpl/aux_/preprocessor/sub.hpp"
32
# define BOOST_MPL_PP_EXT_PARAMS(i,j,p) \
33
BOOST_MPL_PP_EXT_PARAMS_DELAY_1(i,BOOST_MPL_PP_SUB(j,i),p) \
36
# define BOOST_MPL_PP_EXT_PARAMS_DELAY_1(i,n,p) \
37
BOOST_MPL_PP_EXT_PARAMS_DELAY_2(i,n,p) \
40
# define BOOST_MPL_PP_EXT_PARAMS_DELAY_2(i,n,p) \
41
BOOST_MPL_PP_EXT_PARAMS_##i(n,p) \
44
# define BOOST_MPL_PP_EXT_PARAMS_1(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##1,p##2,p##3,p##4,p##5,p##6,p##7,p##8,p##9)
45
# define BOOST_MPL_PP_EXT_PARAMS_2(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##2,p##3,p##4,p##5,p##6,p##7,p##8,p##9,p1)
46
# define BOOST_MPL_PP_EXT_PARAMS_3(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##3,p##4,p##5,p##6,p##7,p##8,p##9,p1,p2)
47
# define BOOST_MPL_PP_EXT_PARAMS_4(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##4,p##5,p##6,p##7,p##8,p##9,p1,p2,p3)
48
# define BOOST_MPL_PP_EXT_PARAMS_5(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##5,p##6,p##7,p##8,p##9,p1,p2,p3,p4)
49
# define BOOST_MPL_PP_EXT_PARAMS_6(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##6,p##7,p##8,p##9,p1,p2,p3,p4,p5)
50
# define BOOST_MPL_PP_EXT_PARAMS_7(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##7,p##8,p##9,p1,p2,p3,p4,p5,p6)
51
# define BOOST_MPL_PP_EXT_PARAMS_8(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##8,p##9,p1,p2,p3,p4,p5,p6,p7)
52
# define BOOST_MPL_PP_EXT_PARAMS_9(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##9,p1,p2,p3,p4,p5,p6,p7,p8)
56
# include "boost/preprocessor/arithmetic/add.hpp"
57
# include "boost/preprocessor/arithmetic/sub.hpp"
58
# include "boost/preprocessor/comma_if.hpp"
59
# include "boost/preprocessor/repeat.hpp"
60
# include "boost/preprocessor/tuple/elem.hpp"
61
# include "boost/preprocessor/cat.hpp"
63
# define BOOST_MPL_PP_AUX_EXT_PARAM_FUNC(unused, i, op) \
64
BOOST_PP_COMMA_IF(i) \
66
BOOST_PP_TUPLE_ELEM(2,1,op) \
67
, BOOST_PP_ADD_D(1, i, BOOST_PP_TUPLE_ELEM(2,0,op)) \
71
# define BOOST_MPL_PP_EXT_PARAMS(i, j, param) \
73
BOOST_PP_SUB_D(1,j,i) \
74
, BOOST_MPL_PP_AUX_EXT_PARAM_FUNC \
79
#endif // BOOST_MPL_NO_OWN_PP_PRIMITIVES
81
#endif // BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED