annotate DEPENDENCIES/generic/include/boost/spirit/home/classic/phoenix/functions.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents 2665513ce2d3
children
rev   line source
Chris@16 1 /*=============================================================================
Chris@16 2 Phoenix V1.2.1
Chris@16 3 Copyright (c) 2001-2002 Joel de Guzman
Chris@16 4
Chris@16 5 Distributed under the Boost Software License, Version 1.0. (See accompanying
Chris@16 6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 7 ==============================================================================*/
Chris@16 8 #ifndef PHOENIX_FUNCTIONS_HPP
Chris@16 9 #define PHOENIX_FUNCTIONS_HPP
Chris@16 10
Chris@16 11 ///////////////////////////////////////////////////////////////////////////////
Chris@16 12 #include <boost/spirit/home/classic/phoenix/actor.hpp>
Chris@16 13 #include <boost/spirit/home/classic/phoenix/composite.hpp>
Chris@16 14
Chris@16 15 ///////////////////////////////////////////////////////////////////////////////
Chris@16 16 namespace phoenix {
Chris@16 17
Chris@16 18 ///////////////////////////////////////////////////////////////////////////////
Chris@16 19 //
Chris@16 20 // function class
Chris@16 21 //
Chris@16 22 // Lazy functions
Chris@16 23 //
Chris@16 24 // This class provides a mechanism for lazily evaluating functions.
Chris@16 25 // Syntactically, a lazy function looks like an ordinary C/C++
Chris@16 26 // function. The function call looks the same. However, unlike
Chris@16 27 // ordinary functions, the actual function execution is deferred.
Chris@16 28 // (see actor.hpp, primitives.hpp and composite.hpp for an
Chris@16 29 // overview). For example here are sample factorial function calls:
Chris@16 30 //
Chris@16 31 // factorial(4)
Chris@16 32 // factorial(arg1)
Chris@16 33 // factorial(arg1 * 6)
Chris@16 34 //
Chris@16 35 // These functions are automatically lazily bound unlike ordinary
Chris@16 36 // function pointers or functor objects that need to be explicitly
Chris@16 37 // bound through the bind function (see binders.hpp).
Chris@16 38 //
Chris@16 39 // A lazy function works in conjunction with a user defined functor
Chris@16 40 // (as usual with a member operator()). Only special forms of
Chris@16 41 // functor objects are allowed. This is required to enable true
Chris@16 42 // polymorphism (STL style monomorphic functors and function
Chris@16 43 // pointers can still be used through the bind facility in
Chris@16 44 // binders.hpp).
Chris@16 45 //
Chris@16 46 // This special functor is expected to have a nested template class
Chris@16 47 // result<A...TN> (where N is the number of arguments of its
Chris@16 48 // member operator()). The nested template class result should have
Chris@16 49 // a typedef 'type' that reflects the return type of its member
Chris@16 50 // operator(). This is essentially a type computer that answers the
Chris@16 51 // metaprogramming question "Given arguments of type A...TN, what
Chris@16 52 // will be the operator()'s return type?".
Chris@16 53 //
Chris@16 54 // There is a special case for functors that accept no arguments.
Chris@16 55 // Such nullary functors are only required to define a typedef
Chris@16 56 // result_type that reflects the return type of its operator().
Chris@16 57 //
Chris@16 58 // Here's an example of a simple functor that computes the
Chris@16 59 // factorial of a number:
Chris@16 60 //
Chris@16 61 // struct factorial_impl {
Chris@16 62 //
Chris@16 63 // template <typename Arg>
Chris@16 64 // struct result { typedef Arg type; };
Chris@16 65 //
Chris@16 66 // template <typename Arg>
Chris@16 67 // Arg operator()(Arg n) const
Chris@16 68 // { return (n <= 0) ? 1 : n * this->operator()(n-1); }
Chris@16 69 // };
Chris@16 70 //
Chris@16 71 // As can be seen, the functor can be polymorphic. Its arguments
Chris@16 72 // and return type are not fixed to a particular type. The example
Chris@16 73 // above for example, can handle any type as long as it can carry
Chris@16 74 // out the required operations (i.e. <=, * and -).
Chris@16 75 //
Chris@16 76 // We can now declare and instantiate a lazy 'factorial' function:
Chris@16 77 //
Chris@16 78 // function<factorial_impl> factorial;
Chris@16 79 //
Chris@16 80 // Invoking a lazy function 'factorial' does not immediately
Chris@16 81 // execute the functor factorial_impl. Instead, a composite (see
Chris@16 82 // composite.hpp) object is created and returned to the caller.
Chris@16 83 // Example:
Chris@16 84 //
Chris@16 85 // factorial(arg1)
Chris@16 86 //
Chris@16 87 // does nothing more than return a composite. A second function
Chris@16 88 // call will invoke the actual factorial function. Example:
Chris@16 89 //
Chris@16 90 // int i = 4;
Chris@16 91 // cout << factorial(arg1)(i);
Chris@16 92 //
Chris@16 93 // will print out "24".
Chris@16 94 //
Chris@16 95 // Take note that in certain cases (e.g. for functors with state),
Chris@16 96 // an instance may be passed on to the constructor. Example:
Chris@16 97 //
Chris@16 98 // function<factorial_impl> factorial(ftor);
Chris@16 99 //
Chris@16 100 // where ftor is an instance of factorial_impl (this is not
Chris@16 101 // necessary in this case since factorial is a simple stateless
Chris@16 102 // functor). Take care though when using functors with state
Chris@16 103 // because the functors are taken in by value. It is best to keep
Chris@16 104 // the data manipulated by a functor outside the functor itself and
Chris@16 105 // keep a reference to this data inside the functor. Also, it is
Chris@16 106 // best to keep functors as small as possible.
Chris@16 107 //
Chris@16 108 ///////////////////////////////////////////////////////////////////////////////
Chris@16 109 template <typename OperationT>
Chris@16 110 struct function {
Chris@16 111
Chris@16 112 function() : op() {}
Chris@16 113 function(OperationT const& op_) : op(op_) {}
Chris@16 114
Chris@16 115 actor<composite<OperationT> >
Chris@16 116 operator()() const;
Chris@16 117
Chris@16 118 template <typename A>
Chris@16 119 typename impl::make_composite<OperationT, A>::type
Chris@16 120 operator()(A const& a) const;
Chris@16 121
Chris@16 122 template <typename A, typename B>
Chris@16 123 typename impl::make_composite<OperationT, A, B>::type
Chris@16 124 operator()(A const& a, B const& b) const;
Chris@16 125
Chris@16 126 template <typename A, typename B, typename C>
Chris@16 127 typename impl::make_composite<OperationT, A, B, C>::type
Chris@16 128 operator()(A const& a, B const& b, C const& c) const;
Chris@16 129
Chris@16 130 #if PHOENIX_LIMIT > 3
Chris@16 131
Chris@16 132 template <typename A, typename B, typename C, typename D>
Chris@16 133 typename impl::make_composite<OperationT, A, B, C, D>::type
Chris@16 134 operator()(A const& a, B const& b, C const& c, D const& d) const;
Chris@16 135
Chris@16 136 template <typename A, typename B, typename C, typename D, typename E>
Chris@16 137 typename impl::make_composite<
Chris@16 138 OperationT, A, B, C, D, E
Chris@16 139 >::type
Chris@16 140 operator()(
Chris@16 141 A const& a, B const& b, C const& c, D const& d, E const& e
Chris@16 142 ) const;
Chris@16 143
Chris@16 144 template <
Chris@16 145 typename A, typename B, typename C, typename D, typename E,
Chris@16 146 typename F
Chris@16 147 >
Chris@16 148 typename impl::make_composite<
Chris@16 149 OperationT, A, B, C, D, E, F
Chris@16 150 >::type
Chris@16 151 operator()(
Chris@16 152 A const& a, B const& b, C const& c, D const& d, E const& e,
Chris@16 153 F const& f
Chris@16 154 ) const;
Chris@16 155
Chris@16 156 #if PHOENIX_LIMIT > 6
Chris@16 157
Chris@16 158 template <
Chris@16 159 typename A, typename B, typename C, typename D, typename E,
Chris@16 160 typename F, typename G
Chris@16 161 >
Chris@16 162 typename impl::make_composite<
Chris@16 163 OperationT, A, B, C, D, E, F, G
Chris@16 164 >::type
Chris@16 165 operator()(
Chris@16 166 A const& a, B const& b, C const& c, D const& d, E const& e,
Chris@16 167 F const& f, G const& g
Chris@16 168 ) const;
Chris@16 169
Chris@16 170 template <
Chris@16 171 typename A, typename B, typename C, typename D, typename E,
Chris@16 172 typename F, typename G, typename H
Chris@16 173 >
Chris@16 174 typename impl::make_composite<
Chris@16 175 OperationT, A, B, C, D, E, F, G, H
Chris@16 176 >::type
Chris@16 177 operator()(
Chris@16 178 A const& a, B const& b, C const& c, D const& d, E const& e,
Chris@16 179 F const& f, G const& g, H const& h
Chris@16 180 ) const;
Chris@16 181
Chris@16 182 template <
Chris@16 183 typename A, typename B, typename C, typename D, typename E,
Chris@16 184 typename F, typename G, typename H, typename I
Chris@16 185 >
Chris@16 186 typename impl::make_composite<
Chris@16 187 OperationT, A, B, C, D, E, F, G, H, I
Chris@16 188 >::type
Chris@16 189 operator()(
Chris@16 190 A const& a, B const& b, C const& c, D const& d, E const& e,
Chris@16 191 F const& f, G const& g, H const& h, I const& i
Chris@16 192 ) const;
Chris@16 193
Chris@16 194 #if PHOENIX_LIMIT > 9
Chris@16 195
Chris@16 196 template <
Chris@16 197 typename A, typename B, typename C, typename D, typename E,
Chris@16 198 typename F, typename G, typename H, typename I, typename J
Chris@16 199 >
Chris@16 200 typename impl::make_composite<
Chris@16 201 OperationT, A, B, C, D, E, F, G, H, I, J
Chris@16 202 >::type
Chris@16 203 operator()(
Chris@16 204 A const& a, B const& b, C const& c, D const& d, E const& e,
Chris@16 205 F const& f, G const& g, H const& h, I const& i, J const& j
Chris@16 206 ) const;
Chris@16 207
Chris@16 208 template <
Chris@16 209 typename A, typename B, typename C, typename D, typename E,
Chris@16 210 typename F, typename G, typename H, typename I, typename J,
Chris@16 211 typename K
Chris@16 212 >
Chris@16 213 typename impl::make_composite<
Chris@16 214 OperationT, A, B, C, D, E, F, G, H, I, J, K
Chris@16 215 >::type
Chris@16 216 operator()(
Chris@16 217 A const& a, B const& b, C const& c, D const& d, E const& e,
Chris@16 218 F const& f, G const& g, H const& h, I const& i, J const& j,
Chris@16 219 K const& k
Chris@16 220 ) const;
Chris@16 221
Chris@16 222 template <
Chris@16 223 typename A, typename B, typename C, typename D, typename E,
Chris@16 224 typename F, typename G, typename H, typename I, typename J,
Chris@16 225 typename K, typename L
Chris@16 226 >
Chris@16 227 typename impl::make_composite<
Chris@16 228 OperationT, A, B, C, D, E, F, G, H, I, J, K, L
Chris@16 229 >::type
Chris@16 230 operator()(
Chris@16 231 A const& a, B const& b, C const& c, D const& d, E const& e,
Chris@16 232 F const& f, G const& g, H const& h, I const& i, J const& j,
Chris@16 233 K const& k, L const& l
Chris@16 234 ) const;
Chris@16 235
Chris@16 236 #if PHOENIX_LIMIT > 12
Chris@16 237
Chris@16 238 template <
Chris@16 239 typename A, typename B, typename C, typename D, typename E,
Chris@16 240 typename F, typename G, typename H, typename I, typename J,
Chris@16 241 typename K, typename L, typename M
Chris@16 242 >
Chris@16 243 typename impl::make_composite<
Chris@16 244 OperationT, A, B, C, D, E, F, G, H, I, J, K, L, M
Chris@16 245 >::type
Chris@16 246 operator()(
Chris@16 247 A const& a, B const& b, C const& c, D const& d, E const& e,
Chris@16 248 F const& f, G const& g, H const& h, I const& i, J const& j,
Chris@16 249 K const& k, L const& l, M const& m
Chris@16 250 ) const;
Chris@16 251
Chris@16 252 template <
Chris@16 253 typename A, typename B, typename C, typename D, typename E,
Chris@16 254 typename F, typename G, typename H, typename I, typename J,
Chris@16 255 typename K, typename L, typename M, typename N
Chris@16 256 >
Chris@16 257 typename impl::make_composite<
Chris@16 258 OperationT, A, B, C, D, E, F, G, H, I, J, K, L, M, N
Chris@16 259 >::type
Chris@16 260 operator()(
Chris@16 261 A const& a, B const& b, C const& c, D const& d, E const& e,
Chris@16 262 F const& f, G const& g, H const& h, I const& i, J const& j,
Chris@16 263 K const& k, L const& l, M const& m, N const& n
Chris@16 264 ) const;
Chris@16 265
Chris@16 266 template <
Chris@16 267 typename A, typename B, typename C, typename D, typename E,
Chris@16 268 typename F, typename G, typename H, typename I, typename J,
Chris@16 269 typename K, typename L, typename M, typename N, typename O
Chris@16 270 >
Chris@16 271 typename impl::make_composite<
Chris@16 272 OperationT, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O
Chris@16 273 >::type
Chris@16 274 operator()(
Chris@16 275 A const& a, B const& b, C const& c, D const& d, E const& e,
Chris@16 276 F const& f, G const& g, H const& h, I const& i, J const& j,
Chris@16 277 K const& k, L const& l, M const& m, N const& n, O const& o
Chris@16 278 ) const;
Chris@16 279
Chris@16 280 #endif
Chris@16 281 #endif
Chris@16 282 #endif
Chris@16 283 #endif
Chris@16 284
Chris@16 285 OperationT op;
Chris@16 286 };
Chris@16 287
Chris@16 288 ///////////////////////////////////////////////////////////////////////////////
Chris@16 289 //
Chris@16 290 // function class implementation
Chris@16 291 //
Chris@16 292 ///////////////////////////////////////////////////////////////////////////////
Chris@16 293 template <typename OperationT>
Chris@16 294 inline actor<composite<OperationT> >
Chris@16 295 function<OperationT>::operator()() const
Chris@16 296 {
Chris@16 297 return actor<composite<OperationT> >(op);
Chris@16 298 }
Chris@16 299
Chris@16 300 //////////////////////////////////
Chris@16 301 template <typename OperationT>
Chris@16 302 template <typename A>
Chris@16 303 inline typename impl::make_composite<OperationT, A>::type
Chris@16 304 function<OperationT>::operator()(A const& a) const
Chris@16 305 {
Chris@16 306 typedef typename impl::make_composite<OperationT, A>::composite_type ret_t;
Chris@16 307 return ret_t
Chris@16 308 (
Chris@16 309 op,
Chris@16 310 as_actor<A>::convert(a)
Chris@16 311 );
Chris@16 312 }
Chris@16 313
Chris@16 314 //////////////////////////////////
Chris@16 315 template <typename OperationT>
Chris@16 316 template <typename A, typename B>
Chris@16 317 inline typename impl::make_composite<OperationT, A, B>::type
Chris@16 318 function<OperationT>::operator()(A const& a, B const& b) const
Chris@16 319 {
Chris@16 320 typedef
Chris@16 321 typename impl::make_composite<OperationT, A, B>::composite_type
Chris@16 322 ret_t;
Chris@16 323
Chris@16 324 return ret_t(
Chris@16 325 op,
Chris@16 326 as_actor<A>::convert(a),
Chris@16 327 as_actor<B>::convert(b)
Chris@16 328 );
Chris@16 329 }
Chris@16 330
Chris@16 331 //////////////////////////////////
Chris@16 332 template <typename OperationT>
Chris@16 333 template <typename A, typename B, typename C>
Chris@16 334 inline typename impl::make_composite<OperationT, A, B, C>::type
Chris@16 335 function<OperationT>::operator()(A const& a, B const& b, C const& c) const
Chris@16 336 {
Chris@16 337 typedef
Chris@16 338 typename impl::make_composite<OperationT, A, B, C>::composite_type
Chris@16 339 ret_t;
Chris@16 340
Chris@16 341 return ret_t(
Chris@16 342 op,
Chris@16 343 as_actor<A>::convert(a),
Chris@16 344 as_actor<B>::convert(b),
Chris@16 345 as_actor<C>::convert(c)
Chris@16 346 );
Chris@16 347 }
Chris@16 348
Chris@16 349 #if PHOENIX_LIMIT > 3
Chris@16 350 //////////////////////////////////
Chris@16 351 template <typename OperationT>
Chris@16 352 template <
Chris@16 353 typename A, typename B, typename C, typename D
Chris@16 354 >
Chris@16 355 inline typename impl::make_composite<
Chris@16 356 OperationT, A, B, C, D
Chris@16 357 >::type
Chris@16 358 function<OperationT>::operator()(
Chris@16 359 A const& a, B const& b, C const& c, D const& d
Chris@16 360 ) const
Chris@16 361 {
Chris@16 362 typedef typename impl::make_composite<
Chris@16 363 OperationT, A, B, C, D
Chris@16 364 >::composite_type ret_t;
Chris@16 365
Chris@16 366 return ret_t(
Chris@16 367 op,
Chris@16 368 as_actor<A>::convert(a),
Chris@16 369 as_actor<B>::convert(b),
Chris@16 370 as_actor<C>::convert(c),
Chris@16 371 as_actor<D>::convert(d)
Chris@16 372 );
Chris@16 373 }
Chris@16 374
Chris@16 375 //////////////////////////////////
Chris@16 376 template <typename OperationT>
Chris@16 377 template <
Chris@16 378 typename A, typename B, typename C, typename D, typename E
Chris@16 379 >
Chris@16 380 inline typename impl::make_composite<
Chris@16 381 OperationT, A, B, C, D, E
Chris@16 382 >::type
Chris@16 383 function<OperationT>::operator()(
Chris@16 384 A const& a, B const& b, C const& c, D const& d, E const& e
Chris@16 385 ) const
Chris@16 386 {
Chris@16 387 typedef typename impl::make_composite<
Chris@16 388 OperationT, A, B, C, D, E
Chris@16 389 >::composite_type ret_t;
Chris@16 390
Chris@16 391 return ret_t(
Chris@16 392 op,
Chris@16 393 as_actor<A>::convert(a),
Chris@16 394 as_actor<B>::convert(b),
Chris@16 395 as_actor<C>::convert(c),
Chris@16 396 as_actor<D>::convert(d),
Chris@16 397 as_actor<E>::convert(e)
Chris@16 398 );
Chris@16 399 }
Chris@16 400
Chris@16 401 //////////////////////////////////
Chris@16 402 template <typename OperationT>
Chris@16 403 template <
Chris@16 404 typename A, typename B, typename C, typename D, typename E,
Chris@16 405 typename F
Chris@16 406 >
Chris@16 407 inline typename impl::make_composite<
Chris@16 408 OperationT, A, B, C, D, E, F
Chris@16 409 >::type
Chris@16 410 function<OperationT>::operator()(
Chris@16 411 A const& a, B const& b, C const& c, D const& d, E const& e,
Chris@16 412 F const& f
Chris@16 413 ) const
Chris@16 414 {
Chris@16 415 typedef typename impl::make_composite<
Chris@16 416 OperationT, A, B, C, D, E, F
Chris@16 417 >::composite_type ret_t;
Chris@16 418
Chris@16 419 return ret_t(
Chris@16 420 op,
Chris@16 421 as_actor<A>::convert(a),
Chris@16 422 as_actor<B>::convert(b),
Chris@16 423 as_actor<C>::convert(c),
Chris@16 424 as_actor<D>::convert(d),
Chris@16 425 as_actor<E>::convert(e),
Chris@16 426 as_actor<F>::convert(f)
Chris@16 427 );
Chris@16 428 }
Chris@16 429
Chris@16 430 #if PHOENIX_LIMIT > 6
Chris@16 431
Chris@16 432 //////////////////////////////////
Chris@16 433 template <typename OperationT>
Chris@16 434 template <
Chris@16 435 typename A, typename B, typename C, typename D, typename E,
Chris@16 436 typename F, typename G
Chris@16 437 >
Chris@16 438 inline typename impl::make_composite<
Chris@16 439 OperationT, A, B, C, D, E, F, G
Chris@16 440 >::type
Chris@16 441 function<OperationT>::operator()(
Chris@16 442 A const& a, B const& b, C const& c, D const& d, E const& e,
Chris@16 443 F const& f, G const& g
Chris@16 444 ) const
Chris@16 445 {
Chris@16 446 typedef typename impl::make_composite<
Chris@16 447 OperationT, A, B, C, D, E, F, G
Chris@16 448 >::composite_type ret_t;
Chris@16 449
Chris@16 450 return ret_t(
Chris@16 451 op,
Chris@16 452 as_actor<A>::convert(a),
Chris@16 453 as_actor<B>::convert(b),
Chris@16 454 as_actor<C>::convert(c),
Chris@16 455 as_actor<D>::convert(d),
Chris@16 456 as_actor<E>::convert(e),
Chris@16 457 as_actor<F>::convert(f),
Chris@16 458 as_actor<G>::convert(g)
Chris@16 459 );
Chris@16 460 }
Chris@16 461
Chris@16 462 //////////////////////////////////
Chris@16 463 template <typename OperationT>
Chris@16 464 template <
Chris@16 465 typename A, typename B, typename C, typename D, typename E,
Chris@16 466 typename F, typename G, typename H
Chris@16 467 >
Chris@16 468 inline typename impl::make_composite<
Chris@16 469 OperationT, A, B, C, D, E, F, G, H
Chris@16 470 >::type
Chris@16 471 function<OperationT>::operator()(
Chris@16 472 A const& a, B const& b, C const& c, D const& d, E const& e,
Chris@16 473 F const& f, G const& g, H const& h
Chris@16 474 ) const
Chris@16 475 {
Chris@16 476 typedef typename impl::make_composite<
Chris@16 477 OperationT, A, B, C, D, E, F, G, H
Chris@16 478 >::composite_type ret_t;
Chris@16 479
Chris@16 480 return ret_t(
Chris@16 481 op,
Chris@16 482 as_actor<A>::convert(a),
Chris@16 483 as_actor<B>::convert(b),
Chris@16 484 as_actor<C>::convert(c),
Chris@16 485 as_actor<D>::convert(d),
Chris@16 486 as_actor<E>::convert(e),
Chris@16 487 as_actor<F>::convert(f),
Chris@16 488 as_actor<G>::convert(g),
Chris@16 489 as_actor<H>::convert(h)
Chris@16 490 );
Chris@16 491 }
Chris@16 492
Chris@16 493 //////////////////////////////////
Chris@16 494 template <typename OperationT>
Chris@16 495 template <
Chris@16 496 typename A, typename B, typename C, typename D, typename E,
Chris@16 497 typename F, typename G, typename H, typename I
Chris@16 498 >
Chris@16 499 inline typename impl::make_composite<
Chris@16 500 OperationT, A, B, C, D, E, F, G, H, I
Chris@16 501 >::type
Chris@16 502 function<OperationT>::operator()(
Chris@16 503 A const& a, B const& b, C const& c, D const& d, E const& e,
Chris@16 504 F const& f, G const& g, H const& h, I const& i
Chris@16 505 ) const
Chris@16 506 {
Chris@16 507 typedef typename impl::make_composite<
Chris@16 508 OperationT, A, B, C, D, E, F, G, H, I
Chris@16 509 >::composite_type ret_t;
Chris@16 510
Chris@16 511 return ret_t(
Chris@16 512 op,
Chris@16 513 as_actor<A>::convert(a),
Chris@16 514 as_actor<B>::convert(b),
Chris@16 515 as_actor<C>::convert(c),
Chris@16 516 as_actor<D>::convert(d),
Chris@16 517 as_actor<E>::convert(e),
Chris@16 518 as_actor<F>::convert(f),
Chris@16 519 as_actor<G>::convert(g),
Chris@16 520 as_actor<H>::convert(h),
Chris@16 521 as_actor<I>::convert(i)
Chris@16 522 );
Chris@16 523 }
Chris@16 524
Chris@16 525 #if PHOENIX_LIMIT > 9
Chris@16 526
Chris@16 527 //////////////////////////////////
Chris@16 528 template <typename OperationT>
Chris@16 529 template <
Chris@16 530 typename A, typename B, typename C, typename D, typename E,
Chris@16 531 typename F, typename G, typename H, typename I, typename J
Chris@16 532 >
Chris@16 533 inline typename impl::make_composite<
Chris@16 534 OperationT, A, B, C, D, E, F, G, H, I, J
Chris@16 535 >::type
Chris@16 536 function<OperationT>::operator()(
Chris@16 537 A const& a, B const& b, C const& c, D const& d, E const& e,
Chris@16 538 F const& f, G const& g, H const& h, I const& i, J const& j
Chris@16 539 ) const
Chris@16 540 {
Chris@16 541 typedef typename impl::make_composite<
Chris@16 542 OperationT, A, B, C, D, E, F, G, H, I, J
Chris@16 543 >::composite_type ret_t;
Chris@16 544
Chris@16 545 return ret_t(
Chris@16 546 op,
Chris@16 547 as_actor<A>::convert(a),
Chris@16 548 as_actor<B>::convert(b),
Chris@16 549 as_actor<C>::convert(c),
Chris@16 550 as_actor<D>::convert(d),
Chris@16 551 as_actor<E>::convert(e),
Chris@16 552 as_actor<F>::convert(f),
Chris@16 553 as_actor<G>::convert(g),
Chris@16 554 as_actor<H>::convert(h),
Chris@16 555 as_actor<I>::convert(i),
Chris@16 556 as_actor<J>::convert(j)
Chris@16 557 );
Chris@16 558 }
Chris@16 559
Chris@16 560 //////////////////////////////////
Chris@16 561 template <typename OperationT>
Chris@16 562 template <
Chris@16 563 typename A, typename B, typename C, typename D, typename E,
Chris@16 564 typename F, typename G, typename H, typename I, typename J,
Chris@16 565 typename K
Chris@16 566 >
Chris@16 567 inline typename impl::make_composite<
Chris@16 568 OperationT, A, B, C, D, E, F, G, H, I, J, K
Chris@16 569 >::type
Chris@16 570 function<OperationT>::operator()(
Chris@16 571 A const& a, B const& b, C const& c, D const& d, E const& e,
Chris@16 572 F const& f, G const& g, H const& h, I const& i, J const& j,
Chris@16 573 K const& k
Chris@16 574 ) const
Chris@16 575 {
Chris@16 576 typedef typename impl::make_composite<
Chris@16 577 OperationT, A, B, C, D, E, F, G, H, I, J, K
Chris@16 578 >::composite_type ret_t;
Chris@16 579
Chris@16 580 return ret_t(
Chris@16 581 op,
Chris@16 582 as_actor<A>::convert(a),
Chris@16 583 as_actor<B>::convert(b),
Chris@16 584 as_actor<C>::convert(c),
Chris@16 585 as_actor<D>::convert(d),
Chris@16 586 as_actor<E>::convert(e),
Chris@16 587 as_actor<F>::convert(f),
Chris@16 588 as_actor<G>::convert(g),
Chris@16 589 as_actor<H>::convert(h),
Chris@16 590 as_actor<I>::convert(i),
Chris@16 591 as_actor<J>::convert(j),
Chris@16 592 as_actor<K>::convert(k)
Chris@16 593 );
Chris@16 594 }
Chris@16 595
Chris@16 596 //////////////////////////////////
Chris@16 597 template <typename OperationT>
Chris@16 598 template <
Chris@16 599 typename A, typename B, typename C, typename D, typename E,
Chris@16 600 typename F, typename G, typename H, typename I, typename J,
Chris@16 601 typename K, typename L
Chris@16 602 >
Chris@16 603 inline typename impl::make_composite<
Chris@16 604 OperationT, A, B, C, D, E, F, G, H, I, J, K, L
Chris@16 605 >::type
Chris@16 606 function<OperationT>::operator()(
Chris@16 607 A const& a, B const& b, C const& c, D const& d, E const& e,
Chris@16 608 F const& f, G const& g, H const& h, I const& i, J const& j,
Chris@16 609 K const& k, L const& l
Chris@16 610 ) const
Chris@16 611 {
Chris@16 612 typedef typename impl::make_composite<
Chris@16 613 OperationT, A, B, C, D, E, F, G, H, I, J, K, L
Chris@16 614 >::composite_type ret_t;
Chris@16 615
Chris@16 616 return ret_t(
Chris@16 617 op,
Chris@16 618 as_actor<A>::convert(a),
Chris@16 619 as_actor<B>::convert(b),
Chris@16 620 as_actor<C>::convert(c),
Chris@16 621 as_actor<D>::convert(d),
Chris@16 622 as_actor<E>::convert(e),
Chris@16 623 as_actor<F>::convert(f),
Chris@16 624 as_actor<G>::convert(g),
Chris@16 625 as_actor<H>::convert(h),
Chris@16 626 as_actor<I>::convert(i),
Chris@16 627 as_actor<J>::convert(j),
Chris@16 628 as_actor<K>::convert(k),
Chris@16 629 as_actor<L>::convert(l)
Chris@16 630 );
Chris@16 631 }
Chris@16 632
Chris@16 633 #if PHOENIX_LIMIT > 12
Chris@16 634
Chris@16 635 //////////////////////////////////
Chris@16 636 template <typename OperationT>
Chris@16 637 template <
Chris@16 638 typename A, typename B, typename C, typename D, typename E,
Chris@16 639 typename F, typename G, typename H, typename I, typename J,
Chris@16 640 typename K, typename L, typename M
Chris@16 641 >
Chris@16 642 inline typename impl::make_composite<
Chris@16 643 OperationT, A, B, C, D, E, F, G, H, I, J, K, L, M
Chris@16 644 >::type
Chris@16 645 function<OperationT>::operator()(
Chris@16 646 A const& a, B const& b, C const& c, D const& d, E const& e,
Chris@16 647 F const& f, G const& g, H const& h, I const& i, J const& j,
Chris@16 648 K const& k, L const& l, M const& m
Chris@16 649 ) const
Chris@16 650 {
Chris@16 651 typedef typename impl::make_composite<
Chris@16 652 OperationT, A, B, C, D, E, F, G, H, I, J, K, L, M
Chris@16 653 >::composite_type ret_t;
Chris@16 654
Chris@16 655 return ret_t(
Chris@16 656 op,
Chris@16 657 as_actor<A>::convert(a),
Chris@16 658 as_actor<B>::convert(b),
Chris@16 659 as_actor<C>::convert(c),
Chris@16 660 as_actor<D>::convert(d),
Chris@16 661 as_actor<E>::convert(e),
Chris@16 662 as_actor<F>::convert(f),
Chris@16 663 as_actor<G>::convert(g),
Chris@16 664 as_actor<H>::convert(h),
Chris@16 665 as_actor<I>::convert(i),
Chris@16 666 as_actor<J>::convert(j),
Chris@16 667 as_actor<K>::convert(k),
Chris@16 668 as_actor<L>::convert(l),
Chris@16 669 as_actor<M>::convert(m)
Chris@16 670 );
Chris@16 671 }
Chris@16 672
Chris@16 673 //////////////////////////////////
Chris@16 674 template <typename OperationT>
Chris@16 675 template <
Chris@16 676 typename A, typename B, typename C, typename D, typename E,
Chris@16 677 typename F, typename G, typename H, typename I, typename J,
Chris@16 678 typename K, typename L, typename M, typename N
Chris@16 679 >
Chris@16 680 inline typename impl::make_composite<
Chris@16 681 OperationT, A, B, C, D, E, F, G, H, I, J, K, L, M, N
Chris@16 682 >::type
Chris@16 683 function<OperationT>::operator()(
Chris@16 684 A const& a, B const& b, C const& c, D const& d, E const& e,
Chris@16 685 F const& f, G const& g, H const& h, I const& i, J const& j,
Chris@16 686 K const& k, L const& l, M const& m, N const& n
Chris@16 687 ) const
Chris@16 688 {
Chris@16 689 typedef typename impl::make_composite<
Chris@16 690 OperationT, A, B, C, D, E, F, G, H, I, J, K, L, M, N
Chris@16 691 >::composite_type ret_t;
Chris@16 692
Chris@16 693 return ret_t(
Chris@16 694 op,
Chris@16 695 as_actor<A>::convert(a),
Chris@16 696 as_actor<B>::convert(b),
Chris@16 697 as_actor<C>::convert(c),
Chris@16 698 as_actor<D>::convert(d),
Chris@16 699 as_actor<E>::convert(e),
Chris@16 700 as_actor<F>::convert(f),
Chris@16 701 as_actor<G>::convert(g),
Chris@16 702 as_actor<H>::convert(h),
Chris@16 703 as_actor<I>::convert(i),
Chris@16 704 as_actor<J>::convert(j),
Chris@16 705 as_actor<K>::convert(k),
Chris@16 706 as_actor<L>::convert(l),
Chris@16 707 as_actor<M>::convert(m),
Chris@16 708 as_actor<N>::convert(n)
Chris@16 709 );
Chris@16 710 }
Chris@16 711
Chris@16 712 //////////////////////////////////
Chris@16 713 template <typename OperationT>
Chris@16 714 template <
Chris@16 715 typename A, typename B, typename C, typename D, typename E,
Chris@16 716 typename F, typename G, typename H, typename I, typename J,
Chris@16 717 typename K, typename L, typename M, typename N, typename O
Chris@16 718 >
Chris@16 719 inline typename impl::make_composite<
Chris@16 720 OperationT, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O
Chris@16 721 >::type
Chris@16 722 function<OperationT>::operator()(
Chris@16 723 A const& a, B const& b, C const& c, D const& d, E const& e,
Chris@16 724 F const& f, G const& g, H const& h, I const& i, J const& j,
Chris@16 725 K const& k, L const& l, M const& m, N const& n, O const& o
Chris@16 726 ) const
Chris@16 727 {
Chris@16 728 typedef typename impl::make_composite<
Chris@16 729 OperationT, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O
Chris@16 730 >::composite_type ret_t;
Chris@16 731
Chris@16 732 return ret_t(
Chris@16 733 op,
Chris@16 734 as_actor<A>::convert(a),
Chris@16 735 as_actor<B>::convert(b),
Chris@16 736 as_actor<C>::convert(c),
Chris@16 737 as_actor<D>::convert(d),
Chris@16 738 as_actor<E>::convert(e),
Chris@16 739 as_actor<F>::convert(f),
Chris@16 740 as_actor<G>::convert(g),
Chris@16 741 as_actor<H>::convert(h),
Chris@16 742 as_actor<I>::convert(i),
Chris@16 743 as_actor<J>::convert(j),
Chris@16 744 as_actor<K>::convert(k),
Chris@16 745 as_actor<L>::convert(l),
Chris@16 746 as_actor<M>::convert(m),
Chris@16 747 as_actor<N>::convert(n),
Chris@16 748 as_actor<O>::convert(o)
Chris@16 749 );
Chris@16 750 }
Chris@16 751
Chris@16 752 #endif
Chris@16 753 #endif
Chris@16 754 #endif
Chris@16 755 #endif
Chris@16 756
Chris@16 757 ///////////////////////////////////////////////////////////////////////////////
Chris@16 758 } // namespace phoenix
Chris@16 759
Chris@16 760 #endif