Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:41:37

0001 
0002 #ifndef BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED
0003 #define BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED
0004 
0005 // Copyright Aleksey Gurtovoy 2000-2004
0006 //
0007 // Distributed under the Boost Software License, Version 1.0. 
0008 // (See accompanying file LICENSE_1_0.txt or copy at 
0009 // http://www.boost.org/LICENSE_1_0.txt)
0010 //
0011 // See http://www.boost.org/libs/mpl for documentation.
0012 
0013 // $Id$
0014 // $Date$
0015 // $Revision$
0016 
0017 #include <boost/mpl/aux_/config/preprocessor.hpp>
0018 
0019 // BOOST_MPL_PP_EXT_PARAMS(2,2,T): <nothing>
0020 // BOOST_MPL_PP_EXT_PARAMS(2,3,T): T2
0021 // BOOST_MPL_PP_EXT_PARAMS(2,4,T): T2, T3
0022 // BOOST_MPL_PP_EXT_PARAMS(2,n,T): T2, T3, .., Tn-1
0023 
0024 #if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES)
0025 
0026 #   include <boost/mpl/aux_/preprocessor/filter_params.hpp>
0027 #   include <boost/mpl/aux_/preprocessor/sub.hpp>
0028 
0029 #   define BOOST_MPL_PP_EXT_PARAMS(i,j,p) \
0030     BOOST_MPL_PP_EXT_PARAMS_DELAY_1(i,BOOST_MPL_PP_SUB(j,i),p) \
0031     /**/
0032 
0033 #   define BOOST_MPL_PP_EXT_PARAMS_DELAY_1(i,n,p) \
0034     BOOST_MPL_PP_EXT_PARAMS_DELAY_2(i,n,p) \
0035     /**/
0036 
0037 #   define BOOST_MPL_PP_EXT_PARAMS_DELAY_2(i,n,p) \
0038     BOOST_MPL_PP_EXT_PARAMS_##i(n,p) \
0039     /**/
0040 
0041 #   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)
0042 #   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)
0043 #   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)
0044 #   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)
0045 #   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)
0046 #   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)
0047 #   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)
0048 #   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)
0049 #   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)
0050 
0051 #else
0052 
0053 #   include <boost/preprocessor/arithmetic/add.hpp>
0054 #   include <boost/preprocessor/arithmetic/sub.hpp>
0055 #   include <boost/preprocessor/comma_if.hpp>
0056 #   include <boost/preprocessor/repeat.hpp>
0057 #   include <boost/preprocessor/tuple/elem.hpp>
0058 #   include <boost/preprocessor/cat.hpp>
0059 
0060 #   define BOOST_MPL_PP_AUX_EXT_PARAM_FUNC(unused, i, op) \
0061     BOOST_PP_COMMA_IF(i) \
0062     BOOST_PP_CAT( \
0063           BOOST_PP_TUPLE_ELEM(2,1,op) \
0064         , BOOST_PP_ADD_D(1, i, BOOST_PP_TUPLE_ELEM(2,0,op)) \
0065         ) \
0066     /**/
0067 
0068 #   define BOOST_MPL_PP_EXT_PARAMS(i, j, param) \
0069     BOOST_PP_REPEAT( \
0070           BOOST_PP_SUB_D(1,j,i) \
0071         , BOOST_MPL_PP_AUX_EXT_PARAM_FUNC \
0072         , (i,param) \
0073         ) \
0074     /**/
0075 
0076 #endif
0077 
0078 #endif // BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED