Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 1 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 2 | #if !defined(NDNBOOST_PP_IS_ITERATING) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 3 | |
| 4 | ///// header body |
| 5 | |
| 6 | // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! |
| 7 | |
| 8 | // Copyright Aleksey Gurtovoy 2000-2004 |
| 9 | // |
| 10 | // Distributed under the Boost Software License, Version 1.0. |
| 11 | // (See accompanying file LICENSE_1_0.txt or copy at |
| 12 | // http://www.boost.org/LICENSE_1_0.txt) |
| 13 | // |
| 14 | // See http://www.boost.org/libs/mpl for documentation. |
| 15 | |
| 16 | // $Id: numeric_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ |
| 17 | // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ |
| 18 | // $Revision: 49267 $ |
| 19 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 20 | #if !defined(NDNBOOST_MPL_PREPROCESSING_MODE) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 21 | # include <ndnboost/mpl/numeric_cast.hpp> |
| 22 | # include <ndnboost/mpl/apply_wrap.hpp> |
| 23 | # include <ndnboost/mpl/if.hpp> |
| 24 | # include <ndnboost/mpl/tag.hpp> |
| 25 | # include <ndnboost/mpl/aux_/numeric_cast_utils.hpp> |
| 26 | # include <ndnboost/mpl/aux_/na.hpp> |
| 27 | # include <ndnboost/mpl/aux_/na_spec.hpp> |
| 28 | # include <ndnboost/mpl/aux_/lambda_support.hpp> |
| 29 | # include <ndnboost/mpl/aux_/msvc_eti_base.hpp> |
| 30 | # include <ndnboost/mpl/aux_/value_wknd.hpp> |
| 31 | # include <ndnboost/mpl/aux_/config/eti.hpp> |
| 32 | # include <ndnboost/mpl/aux_/nttp_decl.hpp> |
| 33 | #endif |
| 34 | |
| 35 | #include <ndnboost/mpl/aux_/config/static_constant.hpp> |
| 36 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 37 | #if defined(NDNBOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ |
| 38 | || defined(NDNBOOST_MPL_PREPROCESSING_MODE) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 39 | |
| 40 | # include <ndnboost/mpl/limits/arity.hpp> |
| 41 | # include <ndnboost/mpl/aux_/preprocessor/partial_spec_params.hpp> |
| 42 | # include <ndnboost/mpl/aux_/preprocessor/def_params_tail.hpp> |
| 43 | # include <ndnboost/mpl/aux_/preprocessor/repeat.hpp> |
| 44 | # include <ndnboost/mpl/aux_/preprocessor/ext_params.hpp> |
| 45 | # include <ndnboost/mpl/aux_/preprocessor/params.hpp> |
| 46 | # include <ndnboost/mpl/aux_/preprocessor/enum.hpp> |
| 47 | # include <ndnboost/mpl/aux_/preprocessor/add.hpp> |
| 48 | # include <ndnboost/mpl/aux_/preprocessor/sub.hpp> |
| 49 | # include <ndnboost/mpl/aux_/config/ctps.hpp> |
| 50 | # include <ndnboost/mpl/aux_/config/eti.hpp> |
| 51 | # include <ndnboost/mpl/aux_/config/msvc.hpp> |
| 52 | # include <ndnboost/mpl/aux_/config/workaround.hpp> |
| 53 | |
| 54 | # include <ndnboost/preprocessor/dec.hpp> |
| 55 | # include <ndnboost/preprocessor/inc.hpp> |
| 56 | # include <ndnboost/preprocessor/iterate.hpp> |
| 57 | # include <ndnboost/preprocessor/cat.hpp> |
| 58 | |
| 59 | |
| 60 | #if !defined(AUX778076_OP_ARITY) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 61 | # define AUX778076_OP_ARITY NDNBOOST_MPL_LIMIT_METAFUNCTION_ARITY |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 62 | #endif |
| 63 | |
| 64 | #if !defined(AUX778076_OP_IMPL_NAME) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 65 | # define AUX778076_OP_IMPL_NAME NDNBOOST_PP_CAT(AUX778076_OP_PREFIX,_impl) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 66 | #endif |
| 67 | |
| 68 | #if !defined(AUX778076_OP_TAG_NAME) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 69 | # define AUX778076_OP_TAG_NAME NDNBOOST_PP_CAT(AUX778076_OP_PREFIX,_tag) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 70 | #endif |
| 71 | |
| 72 | namespace ndnboost { namespace mpl { |
| 73 | |
| 74 | template< |
| 75 | typename Tag1 |
| 76 | , typename Tag2 |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 77 | #if NDNBOOST_WORKAROUND(NDNBOOST_MSVC, <= 1300) |
| 78 | , NDNBOOST_MPL_AUX_NTTP_DECL(int, tag1_) = NDNBOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value |
| 79 | , NDNBOOST_MPL_AUX_NTTP_DECL(int, tag2_) = NDNBOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 80 | > |
| 81 | struct AUX778076_OP_IMPL_NAME |
| 82 | : if_c< |
| 83 | ( tag1_ > tag2_ ) |
| 84 | #else |
| 85 | > |
| 86 | struct AUX778076_OP_IMPL_NAME |
| 87 | : if_c< |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 88 | ( NDNBOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) |
| 89 | > NDNBOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 90 | ) |
| 91 | #endif |
| 92 | , aux::cast2nd_impl< AUX778076_OP_IMPL_NAME<Tag1,Tag1>,Tag1,Tag2 > |
| 93 | , aux::cast1st_impl< AUX778076_OP_IMPL_NAME<Tag2,Tag2>,Tag1,Tag2 > |
| 94 | >::type |
| 95 | { |
| 96 | }; |
| 97 | |
| 98 | /// for Digital Mars C++/compilers with no CTPS/TTP support |
| 99 | template<> struct AUX778076_OP_IMPL_NAME<na,na> |
| 100 | { |
| 101 | template< typename U1, typename U2 > struct apply |
| 102 | { |
| 103 | typedef apply type; |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 104 | NDNBOOST_STATIC_CONSTANT(int, value = 0); |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 105 | }; |
| 106 | }; |
| 107 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 108 | #if !defined(NDNBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 109 | template< typename Tag > struct AUX778076_OP_IMPL_NAME<na,Tag> |
| 110 | { |
| 111 | template< typename U1, typename U2 > struct apply |
| 112 | { |
| 113 | typedef apply type; |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 114 | NDNBOOST_STATIC_CONSTANT(int, value = 0); |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 115 | }; |
| 116 | }; |
| 117 | |
| 118 | template< typename Tag > struct AUX778076_OP_IMPL_NAME<Tag,na> |
| 119 | { |
| 120 | template< typename U1, typename U2 > struct apply |
| 121 | { |
| 122 | typedef apply type; |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 123 | NDNBOOST_STATIC_CONSTANT(int, value = 0); |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 124 | }; |
| 125 | }; |
| 126 | #else |
| 127 | template<> struct AUX778076_OP_IMPL_NAME<na,integral_c_tag> |
| 128 | { |
| 129 | template< typename U1, typename U2 > struct apply |
| 130 | { |
| 131 | typedef apply type; |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 132 | NDNBOOST_STATIC_CONSTANT(int, value = 0); |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 133 | }; |
| 134 | }; |
| 135 | |
| 136 | template<> struct AUX778076_OP_IMPL_NAME<integral_c_tag,na> |
| 137 | { |
| 138 | template< typename U1, typename U2 > struct apply |
| 139 | { |
| 140 | typedef apply type; |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 141 | NDNBOOST_STATIC_CONSTANT(int, value = 0); |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 142 | }; |
| 143 | }; |
| 144 | #endif |
| 145 | |
| 146 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 147 | #if defined(NDNBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ |
| 148 | && NDNBOOST_WORKAROUND(NDNBOOST_MSVC, >= 1300) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 149 | template< typename T > struct AUX778076_OP_TAG_NAME |
| 150 | : tag<T,na> |
| 151 | { |
| 152 | }; |
| 153 | #else |
| 154 | template< typename T > struct AUX778076_OP_TAG_NAME |
| 155 | { |
| 156 | typedef typename T::tag type; |
| 157 | }; |
| 158 | #endif |
| 159 | |
| 160 | |
| 161 | #if AUX778076_OP_ARITY != 2 |
| 162 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 163 | # if !defined(NDNBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 164 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 165 | # define AUX778076_OP_RIGHT_OPERAND(unused, i, N) , NDNBOOST_PP_CAT(N, NDNBOOST_MPL_PP_ADD(i, 2))> |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 166 | # define AUX778076_OP_N_CALLS(i, N) \ |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 167 | NDNBOOST_MPL_PP_REPEAT( NDNBOOST_PP_DEC(i), NDNBOOST_MPL_PP_REPEAT_IDENTITY_FUNC, AUX778076_OP_NAME< ) \ |
| 168 | N1 NDNBOOST_MPL_PP_REPEAT( NDNBOOST_MPL_PP_SUB(i, 1), AUX778076_OP_RIGHT_OPERAND, N ) \ |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 169 | /**/ |
| 170 | |
| 171 | template< |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 172 | typename NDNBOOST_MPL_AUX_NA_PARAM(N1) |
| 173 | , typename NDNBOOST_MPL_AUX_NA_PARAM(N2) |
| 174 | NDNBOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename N, na) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 175 | > |
| 176 | struct AUX778076_OP_NAME |
| 177 | : AUX778076_OP_N_CALLS(AUX778076_OP_ARITY, N) |
| 178 | { |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 179 | NDNBOOST_MPL_AUX_LAMBDA_SUPPORT( |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 180 | AUX778076_OP_ARITY |
| 181 | , AUX778076_OP_NAME |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 182 | , ( NDNBOOST_MPL_PP_PARAMS(AUX778076_OP_ARITY, N) ) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 183 | ) |
| 184 | }; |
| 185 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 186 | #define NDNBOOST_PP_ITERATION_PARAMS_1 \ |
| 187 | (3,( NDNBOOST_PP_DEC(AUX778076_OP_ARITY), 2, <ndnboost/mpl/aux_/numeric_op.hpp> )) |
| 188 | #include NDNBOOST_PP_ITERATE() |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 189 | |
| 190 | # undef AUX778076_OP_N_CALLS |
| 191 | # undef AUX778076_OP_RIGHT_OPERAND |
| 192 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 193 | # else // NDNBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 194 | |
| 195 | /// forward declaration |
| 196 | template< |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 197 | typename NDNBOOST_MPL_AUX_NA_PARAM(N1) |
| 198 | , typename NDNBOOST_MPL_AUX_NA_PARAM(N2) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 199 | > |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 200 | struct NDNBOOST_PP_CAT(AUX778076_OP_NAME,2); |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 201 | |
| 202 | template< |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 203 | typename NDNBOOST_MPL_AUX_NA_PARAM(N1) |
| 204 | , typename NDNBOOST_MPL_AUX_NA_PARAM(N2) |
| 205 | NDNBOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename N, na) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 206 | > |
| 207 | struct AUX778076_OP_NAME |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 208 | #if NDNBOOST_WORKAROUND(NDNBOOST_MSVC, == 1300) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 209 | : aux::msvc_eti_base< typename if_< |
| 210 | #else |
| 211 | : if_< |
| 212 | #endif |
| 213 | is_na<N3> |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 214 | , NDNBOOST_PP_CAT(AUX778076_OP_NAME,2)<N1,N2> |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 215 | , AUX778076_OP_NAME< |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 216 | NDNBOOST_PP_CAT(AUX778076_OP_NAME,2)<N1,N2> |
| 217 | , NDNBOOST_MPL_PP_EXT_PARAMS(3, NDNBOOST_PP_INC(AUX778076_OP_ARITY), N) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 218 | > |
| 219 | >::type |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 220 | #if NDNBOOST_WORKAROUND(NDNBOOST_MSVC, == 1300) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 221 | > |
| 222 | #endif |
| 223 | { |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 224 | NDNBOOST_MPL_AUX_LAMBDA_SUPPORT( |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 225 | AUX778076_OP_ARITY |
| 226 | , AUX778076_OP_NAME |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 227 | , ( NDNBOOST_MPL_PP_PARAMS(AUX778076_OP_ARITY, N) ) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 228 | ) |
| 229 | }; |
| 230 | |
| 231 | template< |
| 232 | typename N1 |
| 233 | , typename N2 |
| 234 | > |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 235 | struct NDNBOOST_PP_CAT(AUX778076_OP_NAME,2) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 236 | |
| 237 | #endif |
| 238 | |
| 239 | #else // AUX778076_OP_ARITY == 2 |
| 240 | |
| 241 | template< |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 242 | typename NDNBOOST_MPL_AUX_NA_PARAM(N1) |
| 243 | , typename NDNBOOST_MPL_AUX_NA_PARAM(N2) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 244 | > |
| 245 | struct AUX778076_OP_NAME |
| 246 | |
| 247 | #endif |
| 248 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 249 | #if !defined(NDNBOOST_MPL_CFG_MSVC_ETI_BUG) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 250 | : AUX778076_OP_IMPL_NAME< |
| 251 | typename AUX778076_OP_TAG_NAME<N1>::type |
| 252 | , typename AUX778076_OP_TAG_NAME<N2>::type |
| 253 | >::template apply<N1,N2>::type |
| 254 | #else |
| 255 | : aux::msvc_eti_base< typename apply_wrap2< |
| 256 | AUX778076_OP_IMPL_NAME< |
| 257 | typename AUX778076_OP_TAG_NAME<N1>::type |
| 258 | , typename AUX778076_OP_TAG_NAME<N2>::type |
| 259 | > |
| 260 | , N1 |
| 261 | , N2 |
| 262 | >::type >::type |
| 263 | #endif |
| 264 | { |
| 265 | #if AUX778076_OP_ARITY != 2 |
| 266 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 267 | # if !defined(NDNBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) |
| 268 | NDNBOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 269 | AUX778076_OP_ARITY |
| 270 | , AUX778076_OP_NAME |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 271 | , ( NDNBOOST_MPL_PP_PARTIAL_SPEC_PARAMS(2, N, na) ) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 272 | ) |
| 273 | # else |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 274 | NDNBOOST_MPL_AUX_LAMBDA_SUPPORT(2, NDNBOOST_PP_CAT(AUX778076_OP_NAME,2), (N1, N2)) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 275 | # endif |
| 276 | |
| 277 | #else |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 278 | NDNBOOST_MPL_AUX_LAMBDA_SUPPORT(2, AUX778076_OP_NAME, (N1, N2)) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 279 | #endif |
| 280 | }; |
| 281 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 282 | NDNBOOST_MPL_AUX_NA_SPEC2(2, AUX778076_OP_ARITY, AUX778076_OP_NAME) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 283 | |
| 284 | }} |
| 285 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 286 | #endif // NDNBOOST_MPL_CFG_NO_PREPROCESSED_HEADERS |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 287 | |
| 288 | ///// iteration, depth == 1 |
| 289 | |
| 290 | // For gcc 4.4 compatability, we must include the |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 291 | // NDNBOOST_PP_ITERATION_DEPTH test inside an #else clause. |
| 292 | #else // NDNBOOST_PP_IS_ITERATING |
| 293 | #if NDNBOOST_PP_ITERATION_DEPTH() == 1 |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 294 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 295 | # define i_ NDNBOOST_PP_FRAME_ITERATION(1) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 296 | |
| 297 | template< |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 298 | NDNBOOST_MPL_PP_PARAMS(i_, typename N) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 299 | > |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 300 | struct AUX778076_OP_NAME<NDNBOOST_MPL_PP_PARTIAL_SPEC_PARAMS(i_, N, na)> |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 301 | #if i_ != 2 |
| 302 | : AUX778076_OP_N_CALLS(i_, N) |
| 303 | { |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 304 | NDNBOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 305 | AUX778076_OP_ARITY |
| 306 | , AUX778076_OP_NAME |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 307 | , ( NDNBOOST_MPL_PP_PARTIAL_SPEC_PARAMS(i_, N, na) ) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 308 | ) |
| 309 | }; |
| 310 | #endif |
| 311 | |
| 312 | # undef i_ |
| 313 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 314 | #endif // NDNBOOST_PP_ITERATION_DEPTH() |
| 315 | #endif // NDNBOOST_PP_IS_ITERATING |