Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 1 | |
| 2 | // Copyright Peter Dimov 2001 |
| 3 | // Copyright Aleksey Gurtovoy 2001-2004 |
| 4 | // |
| 5 | // Distributed under the Boost Software License, Version 1.0. |
| 6 | // (See accompanying file LICENSE_1_0.txt or copy at |
| 7 | // http://www.boost.org/LICENSE_1_0.txt) |
| 8 | // |
| 9 | |
| 10 | // Preprocessed version of "ndnboost/mpl/aux_/basic_bind.hpp" header |
| 11 | // -- DO NOT modify by hand! |
| 12 | |
| 13 | namespace ndnboost { namespace mpl { |
| 14 | |
| 15 | namespace aux { |
| 16 | |
| 17 | template< |
| 18 | typename T, typename U1, typename U2, typename U3, typename U4 |
| 19 | , typename U5 |
| 20 | > |
| 21 | struct resolve_bind_arg |
| 22 | { |
| 23 | typedef T type; |
| 24 | }; |
| 25 | |
| 26 | template< |
| 27 | int N, typename U1, typename U2, typename U3, typename U4, typename U5 |
| 28 | > |
| 29 | struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 > |
| 30 | { |
| 31 | typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type; |
| 32 | }; |
| 33 | |
| 34 | template< |
| 35 | typename F, typename T1, typename T2, typename T3, typename T4 |
| 36 | , typename T5, typename U1, typename U2, typename U3, typename U4 |
| 37 | , typename U5 |
| 38 | > |
| 39 | struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > |
| 40 | { |
| 41 | typedef bind< F,T1,T2,T3,T4,T5 > f_; |
| 42 | typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; |
| 43 | }; |
| 44 | |
| 45 | } // namespace aux |
| 46 | |
| 47 | template< |
| 48 | typename F |
| 49 | > |
| 50 | struct bind0 |
| 51 | { |
| 52 | template< |
| 53 | typename U1 = na, typename U2 = na, typename U3 = na |
| 54 | , typename U4 = na, typename U5 = na |
| 55 | > |
| 56 | struct apply |
| 57 | { |
| 58 | private: |
| 59 | typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; |
| 60 | |
| 61 | public: |
| 62 | typedef typename apply_wrap0< |
| 63 | f_ |
| 64 | >::type type; |
| 65 | |
| 66 | }; |
| 67 | }; |
| 68 | |
| 69 | namespace aux { |
| 70 | |
| 71 | template< |
| 72 | typename F, typename U1, typename U2, typename U3, typename U4 |
| 73 | , typename U5 |
| 74 | > |
| 75 | struct resolve_bind_arg< |
| 76 | bind0<F>, U1, U2, U3, U4, U5 |
| 77 | > |
| 78 | { |
| 79 | typedef bind0<F> f_; |
| 80 | typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; |
| 81 | }; |
| 82 | |
| 83 | } // namespace aux |
| 84 | |
| 85 | BOOST_MPL_AUX_ARITY_SPEC(1, bind0) |
| 86 | BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) |
| 87 | |
| 88 | template< |
| 89 | typename F |
| 90 | > |
| 91 | struct bind< F,na,na,na,na,na > |
| 92 | : bind0<F> |
| 93 | { |
| 94 | }; |
| 95 | |
| 96 | template< |
| 97 | typename F, typename T1 |
| 98 | > |
| 99 | struct bind1 |
| 100 | { |
| 101 | template< |
| 102 | typename U1 = na, typename U2 = na, typename U3 = na |
| 103 | , typename U4 = na, typename U5 = na |
| 104 | > |
| 105 | struct apply |
| 106 | { |
| 107 | private: |
| 108 | typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; |
| 109 | typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; |
| 110 | |
| 111 | public: |
| 112 | typedef typename apply_wrap1< |
| 113 | f_ |
| 114 | , typename t1::type |
| 115 | >::type type; |
| 116 | |
| 117 | }; |
| 118 | }; |
| 119 | |
| 120 | namespace aux { |
| 121 | |
| 122 | template< |
| 123 | typename F, typename T1, typename U1, typename U2, typename U3 |
| 124 | , typename U4, typename U5 |
| 125 | > |
| 126 | struct resolve_bind_arg< |
| 127 | bind1< F,T1 >, U1, U2, U3, U4, U5 |
| 128 | > |
| 129 | { |
| 130 | typedef bind1< F,T1 > f_; |
| 131 | typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; |
| 132 | }; |
| 133 | |
| 134 | } // namespace aux |
| 135 | |
| 136 | BOOST_MPL_AUX_ARITY_SPEC(2, bind1) |
| 137 | BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) |
| 138 | |
| 139 | template< |
| 140 | typename F, typename T1 |
| 141 | > |
| 142 | struct bind< F,T1,na,na,na,na > |
| 143 | : bind1< F,T1 > |
| 144 | { |
| 145 | }; |
| 146 | |
| 147 | template< |
| 148 | typename F, typename T1, typename T2 |
| 149 | > |
| 150 | struct bind2 |
| 151 | { |
| 152 | template< |
| 153 | typename U1 = na, typename U2 = na, typename U3 = na |
| 154 | , typename U4 = na, typename U5 = na |
| 155 | > |
| 156 | struct apply |
| 157 | { |
| 158 | private: |
| 159 | typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; |
| 160 | typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; |
| 161 | typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; |
| 162 | |
| 163 | public: |
| 164 | typedef typename apply_wrap2< |
| 165 | f_ |
| 166 | , typename t1::type, typename t2::type |
| 167 | >::type type; |
| 168 | |
| 169 | }; |
| 170 | }; |
| 171 | |
| 172 | namespace aux { |
| 173 | |
| 174 | template< |
| 175 | typename F, typename T1, typename T2, typename U1, typename U2 |
| 176 | , typename U3, typename U4, typename U5 |
| 177 | > |
| 178 | struct resolve_bind_arg< |
| 179 | bind2< F,T1,T2 >, U1, U2, U3, U4, U5 |
| 180 | > |
| 181 | { |
| 182 | typedef bind2< F,T1,T2 > f_; |
| 183 | typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; |
| 184 | }; |
| 185 | |
| 186 | } // namespace aux |
| 187 | |
| 188 | BOOST_MPL_AUX_ARITY_SPEC(3, bind2) |
| 189 | BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) |
| 190 | |
| 191 | template< |
| 192 | typename F, typename T1, typename T2 |
| 193 | > |
| 194 | struct bind< F,T1,T2,na,na,na > |
| 195 | : bind2< F,T1,T2 > |
| 196 | { |
| 197 | }; |
| 198 | |
| 199 | template< |
| 200 | typename F, typename T1, typename T2, typename T3 |
| 201 | > |
| 202 | struct bind3 |
| 203 | { |
| 204 | template< |
| 205 | typename U1 = na, typename U2 = na, typename U3 = na |
| 206 | , typename U4 = na, typename U5 = na |
| 207 | > |
| 208 | struct apply |
| 209 | { |
| 210 | private: |
| 211 | typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; |
| 212 | typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; |
| 213 | typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; |
| 214 | typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; |
| 215 | |
| 216 | public: |
| 217 | typedef typename apply_wrap3< |
| 218 | f_ |
| 219 | , typename t1::type, typename t2::type, typename t3::type |
| 220 | >::type type; |
| 221 | |
| 222 | }; |
| 223 | }; |
| 224 | |
| 225 | namespace aux { |
| 226 | |
| 227 | template< |
| 228 | typename F, typename T1, typename T2, typename T3, typename U1 |
| 229 | , typename U2, typename U3, typename U4, typename U5 |
| 230 | > |
| 231 | struct resolve_bind_arg< |
| 232 | bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 |
| 233 | > |
| 234 | { |
| 235 | typedef bind3< F,T1,T2,T3 > f_; |
| 236 | typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; |
| 237 | }; |
| 238 | |
| 239 | } // namespace aux |
| 240 | |
| 241 | BOOST_MPL_AUX_ARITY_SPEC(4, bind3) |
| 242 | BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) |
| 243 | |
| 244 | template< |
| 245 | typename F, typename T1, typename T2, typename T3 |
| 246 | > |
| 247 | struct bind< F,T1,T2,T3,na,na > |
| 248 | : bind3< F,T1,T2,T3 > |
| 249 | { |
| 250 | }; |
| 251 | |
| 252 | template< |
| 253 | typename F, typename T1, typename T2, typename T3, typename T4 |
| 254 | > |
| 255 | struct bind4 |
| 256 | { |
| 257 | template< |
| 258 | typename U1 = na, typename U2 = na, typename U3 = na |
| 259 | , typename U4 = na, typename U5 = na |
| 260 | > |
| 261 | struct apply |
| 262 | { |
| 263 | private: |
| 264 | typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; |
| 265 | typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; |
| 266 | typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; |
| 267 | typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; |
| 268 | typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; |
| 269 | |
| 270 | public: |
| 271 | typedef typename apply_wrap4< |
| 272 | f_ |
| 273 | , typename t1::type, typename t2::type, typename t3::type |
| 274 | , typename t4::type |
| 275 | >::type type; |
| 276 | |
| 277 | }; |
| 278 | }; |
| 279 | |
| 280 | namespace aux { |
| 281 | |
| 282 | template< |
| 283 | typename F, typename T1, typename T2, typename T3, typename T4 |
| 284 | , typename U1, typename U2, typename U3, typename U4, typename U5 |
| 285 | > |
| 286 | struct resolve_bind_arg< |
| 287 | bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 |
| 288 | > |
| 289 | { |
| 290 | typedef bind4< F,T1,T2,T3,T4 > f_; |
| 291 | typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; |
| 292 | }; |
| 293 | |
| 294 | } // namespace aux |
| 295 | |
| 296 | BOOST_MPL_AUX_ARITY_SPEC(5, bind4) |
| 297 | BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) |
| 298 | |
| 299 | template< |
| 300 | typename F, typename T1, typename T2, typename T3, typename T4 |
| 301 | > |
| 302 | struct bind< F,T1,T2,T3,T4,na > |
| 303 | : bind4< F,T1,T2,T3,T4 > |
| 304 | { |
| 305 | }; |
| 306 | |
| 307 | template< |
| 308 | typename F, typename T1, typename T2, typename T3, typename T4 |
| 309 | , typename T5 |
| 310 | > |
| 311 | struct bind5 |
| 312 | { |
| 313 | template< |
| 314 | typename U1 = na, typename U2 = na, typename U3 = na |
| 315 | , typename U4 = na, typename U5 = na |
| 316 | > |
| 317 | struct apply |
| 318 | { |
| 319 | private: |
| 320 | typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; |
| 321 | typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; |
| 322 | typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; |
| 323 | typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; |
| 324 | typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; |
| 325 | typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; |
| 326 | |
| 327 | public: |
| 328 | typedef typename apply_wrap5< |
| 329 | f_ |
| 330 | , typename t1::type, typename t2::type, typename t3::type |
| 331 | , typename t4::type, typename t5::type |
| 332 | >::type type; |
| 333 | |
| 334 | }; |
| 335 | }; |
| 336 | |
| 337 | namespace aux { |
| 338 | |
| 339 | template< |
| 340 | typename F, typename T1, typename T2, typename T3, typename T4 |
| 341 | , typename T5, typename U1, typename U2, typename U3, typename U4 |
| 342 | , typename U5 |
| 343 | > |
| 344 | struct resolve_bind_arg< |
| 345 | bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 |
| 346 | > |
| 347 | { |
| 348 | typedef bind5< F,T1,T2,T3,T4,T5 > f_; |
| 349 | typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; |
| 350 | }; |
| 351 | |
| 352 | } // namespace aux |
| 353 | |
| 354 | BOOST_MPL_AUX_ARITY_SPEC(6, bind5) |
| 355 | BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) |
| 356 | |
| 357 | /// primary template (not a specialization!) |
| 358 | |
| 359 | template< |
| 360 | typename F, typename T1, typename T2, typename T3, typename T4 |
| 361 | , typename T5 |
| 362 | > |
| 363 | struct bind |
| 364 | : bind5< F,T1,T2,T3,T4,T5 > |
| 365 | { |
| 366 | }; |
| 367 | |
| 368 | /// if_/eval_if specializations |
| 369 | template< template< typename T1, typename T2, typename T3 > class F, typename Tag > |
| 370 | struct quote3; |
| 371 | |
| 372 | template< typename T1, typename T2, typename T3 > struct if_; |
| 373 | |
| 374 | template< |
| 375 | typename Tag, typename T1, typename T2, typename T3 |
| 376 | > |
| 377 | struct bind3< |
| 378 | quote3< if_,Tag > |
| 379 | , T1, T2, T3 |
| 380 | > |
| 381 | { |
| 382 | template< |
| 383 | typename U1 = na, typename U2 = na, typename U3 = na |
| 384 | , typename U4 = na, typename U5 = na |
| 385 | > |
| 386 | struct apply |
| 387 | { |
| 388 | private: |
| 389 | typedef mpl::arg<1> n1; |
| 390 | typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; |
| 391 | typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; |
| 392 | typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; |
| 393 | typedef typename if_< |
| 394 | typename t1::type |
| 395 | , t2, t3 |
| 396 | >::type f_; |
| 397 | |
| 398 | public: |
| 399 | typedef typename f_::type type; |
| 400 | }; |
| 401 | }; |
| 402 | |
| 403 | template< |
| 404 | template< typename T1, typename T2, typename T3 > class F, typename Tag |
| 405 | > |
| 406 | struct quote3; |
| 407 | |
| 408 | template< typename T1, typename T2, typename T3 > struct eval_if; |
| 409 | |
| 410 | template< |
| 411 | typename Tag, typename T1, typename T2, typename T3 |
| 412 | > |
| 413 | struct bind3< |
| 414 | quote3< eval_if,Tag > |
| 415 | , T1, T2, T3 |
| 416 | > |
| 417 | { |
| 418 | template< |
| 419 | typename U1 = na, typename U2 = na, typename U3 = na |
| 420 | , typename U4 = na, typename U5 = na |
| 421 | > |
| 422 | struct apply |
| 423 | { |
| 424 | private: |
| 425 | typedef mpl::arg<1> n1; |
| 426 | typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; |
| 427 | typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; |
| 428 | typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; |
| 429 | typedef typename eval_if< |
| 430 | typename t1::type |
| 431 | , t2, t3 |
| 432 | >::type f_; |
| 433 | |
| 434 | public: |
| 435 | typedef typename f_::type type; |
| 436 | }; |
| 437 | }; |
| 438 | |
| 439 | }} |
| 440 | |