| 1 | /*============================================================================= | 
|---|
| 2 |     Phoenix V1.2.1 | 
|---|
| 3 |     Copyright (c) 2001-2003 Joel de Guzman | 
|---|
| 4 |     Copyright (c) 2001-2003 Hartmut Kaiser | 
|---|
| 5 |     Copyright (c) 2003 Vaclav Vesely | 
|---|
| 6 |  | 
|---|
| 7 |     Use, modification and distribution is subject to the Boost Software | 
|---|
| 8 |     License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at | 
|---|
| 9 |     http://www.boost.org/LICENSE_1_0.txt) | 
|---|
| 10 | ==============================================================================*/ | 
|---|
| 11 |  | 
|---|
| 12 | #ifndef PHOENIX_NEW_HPP | 
|---|
| 13 | #define PHOENIX_NEW_HPP | 
|---|
| 14 |  | 
|---|
| 15 | /////////////////////////////////////////////////////////////////////////////// | 
|---|
| 16 | #include <boost/spirit/phoenix/actor.hpp> | 
|---|
| 17 | #include <boost/spirit/phoenix/composite.hpp> | 
|---|
| 18 | #include <boost/static_assert.hpp> | 
|---|
| 19 |  | 
|---|
| 20 | /////////////////////////////////////////////////////////////////////////////// | 
|---|
| 21 | namespace phoenix { | 
|---|
| 22 |  | 
|---|
| 23 | /////////////////////////////////////////////////////////////////////////////// | 
|---|
| 24 | // | 
|---|
| 25 | //  Phoenix predefined maximum new_ limit. This limit defines the maximum | 
|---|
| 26 | //  number of parameters supported for calles to the set of new_ template | 
|---|
| 27 | //  functions (lazy object construction, see below). This number defaults to 3. | 
|---|
| 28 | //  The actual maximum is rounded up in multiples of 3. Thus, if this value | 
|---|
| 29 | //  is 4, the actual limit is 6. The ultimate maximum limit in this | 
|---|
| 30 | //  implementation is 15. | 
|---|
| 31 | //  PHOENIX_CONSTRUCT_LIMIT should NOT be greater than PHOENIX_LIMIT! | 
|---|
| 32 |  | 
|---|
| 33 | #if !defined(PHOENIX_CONSTRUCT_LIMIT) | 
|---|
| 34 | #define PHOENIX_CONSTRUCT_LIMIT PHOENIX_LIMIT | 
|---|
| 35 | #endif | 
|---|
| 36 |  | 
|---|
| 37 | // ensure PHOENIX_CONSTRUCT_LIMIT <= PHOENIX_LIMIT | 
|---|
| 38 | BOOST_STATIC_ASSERT(PHOENIX_CONSTRUCT_LIMIT <= PHOENIX_LIMIT); | 
|---|
| 39 |  | 
|---|
| 40 | // ensure PHOENIX_CONSTRUCT_LIMIT <= 15 | 
|---|
| 41 | BOOST_STATIC_ASSERT(PHOENIX_CONSTRUCT_LIMIT <= 15); | 
|---|
| 42 |  | 
|---|
| 43 | /////////////////////////////////////////////////////////////////////////////// | 
|---|
| 44 | // | 
|---|
| 45 | //  new_ | 
|---|
| 46 | // | 
|---|
| 47 | //      Lazy object construction | 
|---|
| 48 | // | 
|---|
| 49 | //      The set of new_<> template classes and functions provide a way | 
|---|
| 50 | //      of lazily constructing certain object from a arbitrary set of | 
|---|
| 51 | //      actors during parsing. | 
|---|
| 52 | //      The new_ templates are (syntactically) used very much like | 
|---|
| 53 | //      the well known C++ casts: | 
|---|
| 54 | // | 
|---|
| 55 | //          A *a = new_<A>(...arbitrary list of actors...); | 
|---|
| 56 | // | 
|---|
| 57 | //      where the given parameters are submitted as parameters to the | 
|---|
| 58 | //      contructor of the object of type A. (This certainly implies, that | 
|---|
| 59 | //      type A has a constructor with a fitting set of parameter types | 
|---|
| 60 | //      defined.) | 
|---|
| 61 | // | 
|---|
| 62 | //      The maximum number of needed parameters is controlled through the | 
|---|
| 63 | //      preprocessor constant PHOENIX_CONSTRUCT_LIMIT. Note though, that this | 
|---|
| 64 | //      limit should not be greater than PHOENIX_LIMIT. | 
|---|
| 65 | // | 
|---|
| 66 | /////////////////////////////////////////////////////////////////////////////// | 
|---|
| 67 |  | 
|---|
| 68 | template <typename T> | 
|---|
| 69 | struct new_l_0 | 
|---|
| 70 | { | 
|---|
| 71 |     typedef T* result_type; | 
|---|
| 72 |  | 
|---|
| 73 |     T* operator()() const | 
|---|
| 74 |     { | 
|---|
| 75 |         return new T(); | 
|---|
| 76 |     } | 
|---|
| 77 | }; | 
|---|
| 78 |  | 
|---|
| 79 | template <typename T> | 
|---|
| 80 | struct new_l { | 
|---|
| 81 |  | 
|---|
| 82 |     template < | 
|---|
| 83 |             typename A | 
|---|
| 84 |         ,   typename B | 
|---|
| 85 |         ,   typename C | 
|---|
| 86 |  | 
|---|
| 87 | #if PHOENIX_CONSTRUCT_LIMIT > 3 | 
|---|
| 88 |         ,   typename D | 
|---|
| 89 |         ,   typename E | 
|---|
| 90 |         ,   typename F | 
|---|
| 91 |  | 
|---|
| 92 | #if PHOENIX_CONSTRUCT_LIMIT > 6 | 
|---|
| 93 |         ,   typename G | 
|---|
| 94 |         ,   typename H | 
|---|
| 95 |         ,   typename I | 
|---|
| 96 |  | 
|---|
| 97 | #if PHOENIX_CONSTRUCT_LIMIT > 9 | 
|---|
| 98 |         ,   typename J | 
|---|
| 99 |         ,   typename K | 
|---|
| 100 |         ,   typename L | 
|---|
| 101 |  | 
|---|
| 102 | #if PHOENIX_CONSTRUCT_LIMIT > 12 | 
|---|
| 103 |         ,   typename M | 
|---|
| 104 |         ,   typename N | 
|---|
| 105 |         ,   typename O | 
|---|
| 106 | #endif | 
|---|
| 107 | #endif | 
|---|
| 108 | #endif | 
|---|
| 109 | #endif | 
|---|
| 110 |     > | 
|---|
| 111 |     struct result { typedef T* type; }; | 
|---|
| 112 |  | 
|---|
| 113 |     T* operator()() const { | 
|---|
| 114 |         return new T(); | 
|---|
| 115 |     } | 
|---|
| 116 |  | 
|---|
| 117 |     template <typename A> | 
|---|
| 118 |     T* operator()(A const& a) const { | 
|---|
| 119 |         return new T(a); | 
|---|
| 120 |     } | 
|---|
| 121 |  | 
|---|
| 122 |     template <typename A, typename B> | 
|---|
| 123 |     T* operator()(A const& a, B const& b) const { | 
|---|
| 124 |         return new T(a, b); | 
|---|
| 125 |     } | 
|---|
| 126 |  | 
|---|
| 127 |     template <typename A, typename B, typename C> | 
|---|
| 128 |     T* operator()(A const& a, B const& b, C const& c) const { | 
|---|
| 129 |         return new T(a, b, c); | 
|---|
| 130 |     } | 
|---|
| 131 |  | 
|---|
| 132 | #if PHOENIX_CONSTRUCT_LIMIT > 3 | 
|---|
| 133 |     template < | 
|---|
| 134 |         typename A, typename B, typename C, typename D | 
|---|
| 135 |     > | 
|---|
| 136 |     T* operator()( | 
|---|
| 137 |         A const& a, B const& b, C const& c, D const& d) const | 
|---|
| 138 |     { | 
|---|
| 139 |         return new T(a, b, c, d); | 
|---|
| 140 |     } | 
|---|
| 141 |  | 
|---|
| 142 |     template < | 
|---|
| 143 |         typename A, typename B, typename C, typename D, typename E | 
|---|
| 144 |     > | 
|---|
| 145 |     T* operator()( | 
|---|
| 146 |         A const& a, B const& b, C const& c, D const& d, E const& e) const | 
|---|
| 147 |     { | 
|---|
| 148 |         return new T(a, b, c, d, e); | 
|---|
| 149 |     } | 
|---|
| 150 |  | 
|---|
| 151 |     template < | 
|---|
| 152 |         typename A, typename B, typename C, typename D, typename E, | 
|---|
| 153 |         typename F | 
|---|
| 154 |     > | 
|---|
| 155 |     T* operator()( | 
|---|
| 156 |         A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 157 |         F const& f) const | 
|---|
| 158 |     { | 
|---|
| 159 |         return new T(a, b, c, d, e, f); | 
|---|
| 160 |     } | 
|---|
| 161 |  | 
|---|
| 162 | #if PHOENIX_CONSTRUCT_LIMIT > 6 | 
|---|
| 163 |     template < | 
|---|
| 164 |         typename A, typename B, typename C, typename D, typename E, | 
|---|
| 165 |         typename F, typename G | 
|---|
| 166 |     > | 
|---|
| 167 |     T* operator()( | 
|---|
| 168 |         A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 169 |         F const& f, G const& g) const | 
|---|
| 170 |     { | 
|---|
| 171 |         return new T(a, b, c, d, e, f, g); | 
|---|
| 172 |     } | 
|---|
| 173 |  | 
|---|
| 174 |     template < | 
|---|
| 175 |         typename A, typename B, typename C, typename D, typename E, | 
|---|
| 176 |         typename F, typename G, typename H | 
|---|
| 177 |     > | 
|---|
| 178 |     T* operator()( | 
|---|
| 179 |         A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 180 |         F const& f, G const& g, H const& h) const | 
|---|
| 181 |     { | 
|---|
| 182 |         return new T(a, b, c, d, e, f, g, h); | 
|---|
| 183 |     } | 
|---|
| 184 |  | 
|---|
| 185 |     template < | 
|---|
| 186 |         typename A, typename B, typename C, typename D, typename E, | 
|---|
| 187 |         typename F, typename G, typename H, typename I | 
|---|
| 188 |     > | 
|---|
| 189 |     T* operator()( | 
|---|
| 190 |         A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 191 |         F const& f, G const& g, H const& h, I const& i) const | 
|---|
| 192 |     { | 
|---|
| 193 |         return new T(a, b, c, d, e, f, g, h, i); | 
|---|
| 194 |     } | 
|---|
| 195 |  | 
|---|
| 196 | #if PHOENIX_CONSTRUCT_LIMIT > 9 | 
|---|
| 197 |     template < | 
|---|
| 198 |         typename A, typename B, typename C, typename D, typename E, | 
|---|
| 199 |         typename F, typename G, typename H, typename I, typename J | 
|---|
| 200 |     > | 
|---|
| 201 |     T* operator()( | 
|---|
| 202 |         A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 203 |         F const& f, G const& g, H const& h, I const& i, J const& j) const | 
|---|
| 204 |     { | 
|---|
| 205 |         return new T(a, b, c, d, e, f, g, h, i, j); | 
|---|
| 206 |     } | 
|---|
| 207 |  | 
|---|
| 208 |     template < | 
|---|
| 209 |         typename A, typename B, typename C, typename D, typename E, | 
|---|
| 210 |         typename F, typename G, typename H, typename I, typename J, | 
|---|
| 211 |         typename K | 
|---|
| 212 |     > | 
|---|
| 213 |     T* operator()( | 
|---|
| 214 |         A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 215 |         F const& f, G const& g, H const& h, I const& i, J const& j, | 
|---|
| 216 |         K const& k) const | 
|---|
| 217 |     { | 
|---|
| 218 |         return new T(a, b, c, d, e, f, g, h, i, j, k); | 
|---|
| 219 |     } | 
|---|
| 220 |  | 
|---|
| 221 |     template < | 
|---|
| 222 |         typename A, typename B, typename C, typename D, typename E, | 
|---|
| 223 |         typename F, typename G, typename H, typename I, typename J, | 
|---|
| 224 |         typename K, typename L | 
|---|
| 225 |     > | 
|---|
| 226 |     T* operator()( | 
|---|
| 227 |         A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 228 |         F const& f, G const& g, H const& h, I const& i, J const& j, | 
|---|
| 229 |         K const& k, L const& l) const | 
|---|
| 230 |     { | 
|---|
| 231 |         return new T(a, b, c, d, e, f, g, h, i, j, k, l); | 
|---|
| 232 |     } | 
|---|
| 233 |  | 
|---|
| 234 | #if PHOENIX_CONSTRUCT_LIMIT > 12 | 
|---|
| 235 |     template < | 
|---|
| 236 |         typename A, typename B, typename C, typename D, typename E, | 
|---|
| 237 |         typename F, typename G, typename H, typename I, typename J, | 
|---|
| 238 |         typename K, typename L, typename M | 
|---|
| 239 |     > | 
|---|
| 240 |     T* operator()( | 
|---|
| 241 |         A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 242 |         F const& f, G const& g, H const& h, I const& i, J const& j, | 
|---|
| 243 |         K const& k, L const& l, M const& m) const | 
|---|
| 244 |     { | 
|---|
| 245 |         return new T(a, b, c, d, e, f, g, h, i, j, k, l, m); | 
|---|
| 246 |     } | 
|---|
| 247 |  | 
|---|
| 248 |     template < | 
|---|
| 249 |         typename A, typename B, typename C, typename D, typename E, | 
|---|
| 250 |         typename F, typename G, typename H, typename I, typename J, | 
|---|
| 251 |         typename K, typename L, typename M, typename N | 
|---|
| 252 |     > | 
|---|
| 253 |     T* operator()( | 
|---|
| 254 |         A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 255 |         F const& f, G const& g, H const& h, I const& i, J const& j, | 
|---|
| 256 |         K const& k, L const& l, M const& m, N const& n) const | 
|---|
| 257 |     { | 
|---|
| 258 |         return new T(a, b, c, d, e, f, g, h, i, j, k, l, m, n); | 
|---|
| 259 |     } | 
|---|
| 260 |  | 
|---|
| 261 |     template < | 
|---|
| 262 |         typename A, typename B, typename C, typename D, typename E, | 
|---|
| 263 |         typename F, typename G, typename H, typename I, typename J, | 
|---|
| 264 |         typename K, typename L, typename M, typename N, typename O | 
|---|
| 265 |     > | 
|---|
| 266 |     T* operator()( | 
|---|
| 267 |         A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 268 |         F const& f, G const& g, H const& h, I const& i, J const& j, | 
|---|
| 269 |         K const& k, L const& l, M const& m, N const& n, O const& o) const | 
|---|
| 270 |     { | 
|---|
| 271 |         return new T(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o); | 
|---|
| 272 |     } | 
|---|
| 273 |  | 
|---|
| 274 | #endif | 
|---|
| 275 | #endif | 
|---|
| 276 | #endif | 
|---|
| 277 | #endif | 
|---|
| 278 | }; | 
|---|
| 279 |  | 
|---|
| 280 | template <typename T> | 
|---|
| 281 | struct new_1 { | 
|---|
| 282 |  | 
|---|
| 283 |     template < | 
|---|
| 284 |             typename A | 
|---|
| 285 |     > | 
|---|
| 286 |     struct result { typedef T* type; }; | 
|---|
| 287 |  | 
|---|
| 288 |     template <typename A> | 
|---|
| 289 |     T* operator()(A const& a) const { | 
|---|
| 290 |         return new T(a); | 
|---|
| 291 |     } | 
|---|
| 292 |  | 
|---|
| 293 | }; | 
|---|
| 294 |  | 
|---|
| 295 | template <typename T> | 
|---|
| 296 | struct new_2 { | 
|---|
| 297 |  | 
|---|
| 298 |     template < | 
|---|
| 299 |             typename A | 
|---|
| 300 |         ,   typename B | 
|---|
| 301 |     > | 
|---|
| 302 |     struct result { typedef T* type; }; | 
|---|
| 303 |  | 
|---|
| 304 |     template <typename A, typename B> | 
|---|
| 305 |     T* operator()(A const& a, B const& b) const { | 
|---|
| 306 |         return new T(a, b); | 
|---|
| 307 |     } | 
|---|
| 308 |  | 
|---|
| 309 | }; | 
|---|
| 310 |  | 
|---|
| 311 | template <typename T> | 
|---|
| 312 | struct new_3 { | 
|---|
| 313 |  | 
|---|
| 314 |     template < | 
|---|
| 315 |             typename A | 
|---|
| 316 |         ,   typename B | 
|---|
| 317 |         ,   typename C | 
|---|
| 318 |     > | 
|---|
| 319 |     struct result { typedef T* type; }; | 
|---|
| 320 |  | 
|---|
| 321 |     template <typename A, typename B, typename C> | 
|---|
| 322 |     T* operator()(A const& a, B const& b, C const& c) const { | 
|---|
| 323 |         return new T(a, b, c); | 
|---|
| 324 |     } | 
|---|
| 325 | }; | 
|---|
| 326 |  | 
|---|
| 327 | #if PHOENIX_CONSTRUCT_LIMIT > 3 | 
|---|
| 328 | template <typename T> | 
|---|
| 329 | struct new_4 { | 
|---|
| 330 |  | 
|---|
| 331 |     template < | 
|---|
| 332 |             typename A | 
|---|
| 333 |         ,   typename B | 
|---|
| 334 |         ,   typename C | 
|---|
| 335 |         ,   typename D | 
|---|
| 336 |     > | 
|---|
| 337 |     struct result { typedef T* type; }; | 
|---|
| 338 |  | 
|---|
| 339 |  | 
|---|
| 340 |     template < | 
|---|
| 341 |         typename A, typename B, typename C, typename D | 
|---|
| 342 |     > | 
|---|
| 343 |     T* operator()( | 
|---|
| 344 |         A const& a, B const& b, C const& c, D const& d) const | 
|---|
| 345 |     { | 
|---|
| 346 |         return new T(a, b, c, d); | 
|---|
| 347 |     } | 
|---|
| 348 | }; | 
|---|
| 349 |  | 
|---|
| 350 |  | 
|---|
| 351 | template <typename T> | 
|---|
| 352 | struct new_5 { | 
|---|
| 353 |  | 
|---|
| 354 |     template < | 
|---|
| 355 |             typename A | 
|---|
| 356 |         ,   typename B | 
|---|
| 357 |         ,   typename C | 
|---|
| 358 |         ,   typename D | 
|---|
| 359 |         ,   typename E | 
|---|
| 360 |     > | 
|---|
| 361 |     struct result { typedef T* type; }; | 
|---|
| 362 |  | 
|---|
| 363 |     template < | 
|---|
| 364 |         typename A, typename B, typename C, typename D, typename E | 
|---|
| 365 |     > | 
|---|
| 366 |     T* operator()( | 
|---|
| 367 |         A const& a, B const& b, C const& c, D const& d, E const& e) const | 
|---|
| 368 |     { | 
|---|
| 369 |         return new T(a, b, c, d, e); | 
|---|
| 370 |     } | 
|---|
| 371 | }; | 
|---|
| 372 |  | 
|---|
| 373 |  | 
|---|
| 374 | template <typename T> | 
|---|
| 375 | struct new_6 { | 
|---|
| 376 |  | 
|---|
| 377 |     template < | 
|---|
| 378 |             typename A | 
|---|
| 379 |         ,   typename B | 
|---|
| 380 |         ,   typename C | 
|---|
| 381 |         ,   typename D | 
|---|
| 382 |         ,   typename E | 
|---|
| 383 |         ,   typename F | 
|---|
| 384 |     > | 
|---|
| 385 |     struct result { typedef T* type; }; | 
|---|
| 386 |  | 
|---|
| 387 |     template < | 
|---|
| 388 |         typename A, typename B, typename C, typename D, typename E, | 
|---|
| 389 |         typename F | 
|---|
| 390 |     > | 
|---|
| 391 |     T* operator()( | 
|---|
| 392 |         A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 393 |         F const& f) const | 
|---|
| 394 |     { | 
|---|
| 395 |         return new T(a, b, c, d, e, f); | 
|---|
| 396 |     } | 
|---|
| 397 | }; | 
|---|
| 398 | #endif | 
|---|
| 399 |  | 
|---|
| 400 |  | 
|---|
| 401 | #if PHOENIX_CONSTRUCT_LIMIT > 6 | 
|---|
| 402 | template <typename T> | 
|---|
| 403 | struct new_7 { | 
|---|
| 404 |  | 
|---|
| 405 |     template < | 
|---|
| 406 |             typename A | 
|---|
| 407 |         ,   typename B | 
|---|
| 408 |         ,   typename C | 
|---|
| 409 |         ,   typename D | 
|---|
| 410 |         ,   typename E | 
|---|
| 411 |         ,   typename F | 
|---|
| 412 |         ,   typename G | 
|---|
| 413 |     > | 
|---|
| 414 |     struct result { typedef T* type; }; | 
|---|
| 415 |  | 
|---|
| 416 |     template < | 
|---|
| 417 |         typename A, typename B, typename C, typename D, typename E, | 
|---|
| 418 |         typename F, typename G | 
|---|
| 419 |     > | 
|---|
| 420 |     T* operator()( | 
|---|
| 421 |         A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 422 |         F const& f, G const& g) const | 
|---|
| 423 |     { | 
|---|
| 424 |         return new T(a, b, c, d, e, f, g); | 
|---|
| 425 |     } | 
|---|
| 426 | }; | 
|---|
| 427 |  | 
|---|
| 428 | template <typename T> | 
|---|
| 429 | struct new_8 { | 
|---|
| 430 |  | 
|---|
| 431 |     template < | 
|---|
| 432 |             typename A | 
|---|
| 433 |         ,   typename B | 
|---|
| 434 |         ,   typename C | 
|---|
| 435 |         ,   typename D | 
|---|
| 436 |         ,   typename E | 
|---|
| 437 |         ,   typename F | 
|---|
| 438 |         ,   typename G | 
|---|
| 439 |         ,   typename H | 
|---|
| 440 |     > | 
|---|
| 441 |     struct result { typedef T* type; }; | 
|---|
| 442 |  | 
|---|
| 443 |     template < | 
|---|
| 444 |         typename A, typename B, typename C, typename D, typename E, | 
|---|
| 445 |         typename F, typename G, typename H | 
|---|
| 446 |     > | 
|---|
| 447 |     T* operator()( | 
|---|
| 448 |         A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 449 |         F const& f, G const& g, H const& h) const | 
|---|
| 450 |     { | 
|---|
| 451 |         return new T(a, b, c, d, e, f, g, h); | 
|---|
| 452 |     } | 
|---|
| 453 | }; | 
|---|
| 454 |  | 
|---|
| 455 | template <typename T> | 
|---|
| 456 | struct new_9 { | 
|---|
| 457 |  | 
|---|
| 458 |     template < | 
|---|
| 459 |             typename A | 
|---|
| 460 |         ,   typename B | 
|---|
| 461 |         ,   typename C | 
|---|
| 462 |         ,   typename D | 
|---|
| 463 |         ,   typename E | 
|---|
| 464 |         ,   typename F | 
|---|
| 465 |         ,   typename G | 
|---|
| 466 |         ,   typename H | 
|---|
| 467 |         ,   typename I | 
|---|
| 468 |     > | 
|---|
| 469 |     struct result { typedef T* type; }; | 
|---|
| 470 |  | 
|---|
| 471 |     template < | 
|---|
| 472 |         typename A, typename B, typename C, typename D, typename E, | 
|---|
| 473 |         typename F, typename G, typename H, typename I | 
|---|
| 474 |     > | 
|---|
| 475 |     T* operator()( | 
|---|
| 476 |         A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 477 |         F const& f, G const& g, H const& h, I const& i) const | 
|---|
| 478 |     { | 
|---|
| 479 |         return new T(a, b, c, d, e, f, g, h, i); | 
|---|
| 480 |     } | 
|---|
| 481 | }; | 
|---|
| 482 | #endif | 
|---|
| 483 |  | 
|---|
| 484 |  | 
|---|
| 485 | #if PHOENIX_CONSTRUCT_LIMIT > 9 | 
|---|
| 486 | template <typename T> | 
|---|
| 487 | struct new_10 { | 
|---|
| 488 |  | 
|---|
| 489 |     template < | 
|---|
| 490 |             typename A | 
|---|
| 491 |         ,   typename B | 
|---|
| 492 |         ,   typename C | 
|---|
| 493 |         ,   typename D | 
|---|
| 494 |         ,   typename E | 
|---|
| 495 |         ,   typename F | 
|---|
| 496 |         ,   typename G | 
|---|
| 497 |         ,   typename H | 
|---|
| 498 |         ,   typename I | 
|---|
| 499 |         ,   typename J | 
|---|
| 500 |     > | 
|---|
| 501 |     struct result { typedef T* type; }; | 
|---|
| 502 |  | 
|---|
| 503 |  | 
|---|
| 504 |     template < | 
|---|
| 505 |         typename A, typename B, typename C, typename D, typename E, | 
|---|
| 506 |         typename F, typename G, typename H, typename I, typename J | 
|---|
| 507 |     > | 
|---|
| 508 |     T* operator()( | 
|---|
| 509 |         A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 510 |         F const& f, G const& g, H const& h, I const& i, J const& j) const | 
|---|
| 511 |     { | 
|---|
| 512 |         return new T(a, b, c, d, e, f, g, h, i, j); | 
|---|
| 513 |     } | 
|---|
| 514 | }; | 
|---|
| 515 |  | 
|---|
| 516 | template <typename T> | 
|---|
| 517 | struct new_11 { | 
|---|
| 518 |  | 
|---|
| 519 |     template < | 
|---|
| 520 |             typename A | 
|---|
| 521 |         ,   typename B | 
|---|
| 522 |         ,   typename C | 
|---|
| 523 |         ,   typename D | 
|---|
| 524 |         ,   typename E | 
|---|
| 525 |         ,   typename F | 
|---|
| 526 |         ,   typename G | 
|---|
| 527 |         ,   typename H | 
|---|
| 528 |         ,   typename I | 
|---|
| 529 |         ,   typename J | 
|---|
| 530 |         ,   typename K | 
|---|
| 531 |     > | 
|---|
| 532 |     struct result { typedef T* type; }; | 
|---|
| 533 |  | 
|---|
| 534 |  | 
|---|
| 535 |     template < | 
|---|
| 536 |         typename A, typename B, typename C, typename D, typename E, | 
|---|
| 537 |         typename F, typename G, typename H, typename I, typename J, | 
|---|
| 538 |         typename K | 
|---|
| 539 |     > | 
|---|
| 540 |     T* operator()( | 
|---|
| 541 |         A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 542 |         F const& f, G const& g, H const& h, I const& i, J const& j, | 
|---|
| 543 |         K const& k) const | 
|---|
| 544 |     { | 
|---|
| 545 |         return new T(a, b, c, d, e, f, g, h, i, j, k); | 
|---|
| 546 |     } | 
|---|
| 547 |  | 
|---|
| 548 | }; | 
|---|
| 549 |  | 
|---|
| 550 | template <typename T> | 
|---|
| 551 | struct new_12 { | 
|---|
| 552 |  | 
|---|
| 553 |     template < | 
|---|
| 554 |             typename A | 
|---|
| 555 |         ,   typename B | 
|---|
| 556 |         ,   typename C | 
|---|
| 557 |         ,   typename D | 
|---|
| 558 |         ,   typename E | 
|---|
| 559 |         ,   typename F | 
|---|
| 560 |         ,   typename G | 
|---|
| 561 |         ,   typename H | 
|---|
| 562 |         ,   typename I | 
|---|
| 563 |         ,   typename J | 
|---|
| 564 |         ,   typename K | 
|---|
| 565 |         ,   typename L | 
|---|
| 566 |     > | 
|---|
| 567 |     struct result { typedef T* type; }; | 
|---|
| 568 |  | 
|---|
| 569 |  | 
|---|
| 570 |     template < | 
|---|
| 571 |         typename A, typename B, typename C, typename D, typename E, | 
|---|
| 572 |         typename F, typename G, typename H, typename I, typename J, | 
|---|
| 573 |         typename K, typename L | 
|---|
| 574 |     > | 
|---|
| 575 |     T* operator()( | 
|---|
| 576 |         A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 577 |         F const& f, G const& g, H const& h, I const& i, J const& j, | 
|---|
| 578 |         K const& k, L const& l) const | 
|---|
| 579 |     { | 
|---|
| 580 |         return new T(a, b, c, d, f, e, g, h, i, j, k, l); | 
|---|
| 581 |     } | 
|---|
| 582 | }; | 
|---|
| 583 | #endif | 
|---|
| 584 |  | 
|---|
| 585 | #if PHOENIX_CONSTRUCT_LIMIT > 12 | 
|---|
| 586 | template <typename T> | 
|---|
| 587 | struct new_13 { | 
|---|
| 588 |  | 
|---|
| 589 |     template < | 
|---|
| 590 |             typename A | 
|---|
| 591 |         ,   typename B | 
|---|
| 592 |         ,   typename C | 
|---|
| 593 |         ,   typename D | 
|---|
| 594 |         ,   typename E | 
|---|
| 595 |         ,   typename F | 
|---|
| 596 |         ,   typename G | 
|---|
| 597 |         ,   typename H | 
|---|
| 598 |         ,   typename I | 
|---|
| 599 |         ,   typename J | 
|---|
| 600 |         ,   typename K | 
|---|
| 601 |         ,   typename L | 
|---|
| 602 |         ,   typename M | 
|---|
| 603 |     > | 
|---|
| 604 |     struct result { typedef T* type; }; | 
|---|
| 605 |  | 
|---|
| 606 |  | 
|---|
| 607 |     template < | 
|---|
| 608 |         typename A, typename B, typename C, typename D, typename E, | 
|---|
| 609 |         typename F, typename G, typename H, typename I, typename J, | 
|---|
| 610 |         typename K, typename L, typename M | 
|---|
| 611 |     > | 
|---|
| 612 |     T* operator()( | 
|---|
| 613 |         A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 614 |         F const& f, G const& g, H const& h, I const& i, J const& j, | 
|---|
| 615 |         K const& k, L const& l, M const& m) const | 
|---|
| 616 |     { | 
|---|
| 617 |         return new T(a, b, c, d, e, f, g, h, i, j, k, l, m); | 
|---|
| 618 |     } | 
|---|
| 619 | }; | 
|---|
| 620 |  | 
|---|
| 621 | template <typename T> | 
|---|
| 622 | struct new_14 { | 
|---|
| 623 |  | 
|---|
| 624 |     template < | 
|---|
| 625 |             typename A | 
|---|
| 626 |         ,   typename B | 
|---|
| 627 |         ,   typename C | 
|---|
| 628 |         ,   typename D | 
|---|
| 629 |         ,   typename E | 
|---|
| 630 |         ,   typename F | 
|---|
| 631 |         ,   typename G | 
|---|
| 632 |         ,   typename H | 
|---|
| 633 |         ,   typename I | 
|---|
| 634 |         ,   typename J | 
|---|
| 635 |         ,   typename K | 
|---|
| 636 |         ,   typename L | 
|---|
| 637 |         ,   typename M | 
|---|
| 638 |         ,   typename N | 
|---|
| 639 |     > | 
|---|
| 640 |     struct result { typedef T* type; }; | 
|---|
| 641 |  | 
|---|
| 642 |  | 
|---|
| 643 |     template < | 
|---|
| 644 |         typename A, typename B, typename C, typename D, typename E, | 
|---|
| 645 |         typename F, typename G, typename H, typename I, typename J, | 
|---|
| 646 |         typename K, typename L, typename M, typename N | 
|---|
| 647 |     > | 
|---|
| 648 |     T* operator()( | 
|---|
| 649 |         A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 650 |         F const& f, G const& g, H const& h, I const& i, J const& j, | 
|---|
| 651 |         K const& k, L const& l, M const& m, N const& n) const | 
|---|
| 652 |     { | 
|---|
| 653 |         return new T(a, b, c, d, e, f, g, h, i, j, k, l, m, n); | 
|---|
| 654 |     } | 
|---|
| 655 |  | 
|---|
| 656 | }; | 
|---|
| 657 |  | 
|---|
| 658 | template <typename T> | 
|---|
| 659 | struct new_15 { | 
|---|
| 660 |  | 
|---|
| 661 |     template < | 
|---|
| 662 |             typename A | 
|---|
| 663 |         ,   typename B | 
|---|
| 664 |         ,   typename C | 
|---|
| 665 |         ,   typename D | 
|---|
| 666 |         ,   typename E | 
|---|
| 667 |         ,   typename F | 
|---|
| 668 |         ,   typename G | 
|---|
| 669 |         ,   typename H | 
|---|
| 670 |         ,   typename I | 
|---|
| 671 |         ,   typename J | 
|---|
| 672 |         ,   typename K | 
|---|
| 673 |         ,   typename L | 
|---|
| 674 |         ,   typename M | 
|---|
| 675 |         ,   typename N | 
|---|
| 676 |         ,   typename O | 
|---|
| 677 |     > | 
|---|
| 678 |     struct result { typedef T* type; }; | 
|---|
| 679 |  | 
|---|
| 680 |  | 
|---|
| 681 |     template < | 
|---|
| 682 |         typename A, typename B, typename C, typename D, typename E, | 
|---|
| 683 |         typename F, typename G, typename H, typename I, typename J, | 
|---|
| 684 |         typename K, typename L, typename M, typename N, typename O | 
|---|
| 685 |     > | 
|---|
| 686 |     T* operator()( | 
|---|
| 687 |         A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 688 |         F const& f, G const& g, H const& h, I const& i, J const& j, | 
|---|
| 689 |         K const& k, L const& l, M const& m, N const& n, O const& o) const | 
|---|
| 690 |     { | 
|---|
| 691 |         return new T(a, b, c, d, f, e, g, h, i, j, k, l, m, n, o); | 
|---|
| 692 |     } | 
|---|
| 693 |  | 
|---|
| 694 | }; | 
|---|
| 695 | #endif | 
|---|
| 696 |  | 
|---|
| 697 |  | 
|---|
| 698 | #if defined(__BORLANDC__) || (defined(__MWERKS__) && (__MWERKS__ <= 0x3002)) | 
|---|
| 699 |  | 
|---|
| 700 | /////////////////////////////////////////////////////////////////////////////// | 
|---|
| 701 | // | 
|---|
| 702 | //  The following specializations are needed because Borland and CodeWarrior | 
|---|
| 703 | //  does not accept default template arguments in nested template classes in | 
|---|
| 704 | //  classes (i.e new_l::result) | 
|---|
| 705 | // | 
|---|
| 706 | /////////////////////////////////////////////////////////////////////////////// | 
|---|
| 707 | template <typename T, typename TupleT> | 
|---|
| 708 | struct composite0_result<new_l_0<T>, TupleT> { | 
|---|
| 709 |  | 
|---|
| 710 |     typedef T* type; | 
|---|
| 711 | }; | 
|---|
| 712 |  | 
|---|
| 713 | ////////////////////////////////// | 
|---|
| 714 | template <typename T, typename TupleT, | 
|---|
| 715 |     typename A> | 
|---|
| 716 | struct composite1_result<new_l<T>, TupleT, A> { | 
|---|
| 717 |  | 
|---|
| 718 |     typedef T* type; | 
|---|
| 719 | }; | 
|---|
| 720 |  | 
|---|
| 721 | ////////////////////////////////// | 
|---|
| 722 | template <typename T, typename TupleT, | 
|---|
| 723 |     typename A, typename B> | 
|---|
| 724 | struct composite2_result<new_l<T>, TupleT, A, B> { | 
|---|
| 725 |  | 
|---|
| 726 |     typedef T* type; | 
|---|
| 727 | }; | 
|---|
| 728 |  | 
|---|
| 729 | ////////////////////////////////// | 
|---|
| 730 | template <typename T, typename TupleT, | 
|---|
| 731 |     typename A, typename B, typename C> | 
|---|
| 732 | struct composite3_result<new_l<T>, TupleT, A, B, C> { | 
|---|
| 733 |  | 
|---|
| 734 |     typedef T* type; | 
|---|
| 735 | }; | 
|---|
| 736 |  | 
|---|
| 737 | #if PHOENIX_LIMIT > 3 | 
|---|
| 738 | ////////////////////////////////// | 
|---|
| 739 | template <typename T, typename TupleT, | 
|---|
| 740 |     typename A, typename B, typename C, typename D> | 
|---|
| 741 | struct composite4_result<new_l<T>, TupleT, | 
|---|
| 742 |     A, B, C, D> { | 
|---|
| 743 |  | 
|---|
| 744 |     typedef T* type; | 
|---|
| 745 | }; | 
|---|
| 746 |  | 
|---|
| 747 | ////////////////////////////////// | 
|---|
| 748 | template <typename T, typename TupleT, | 
|---|
| 749 |     typename A, typename B, typename C, typename D, typename E> | 
|---|
| 750 | struct composite5_result<new_l<T>, TupleT, | 
|---|
| 751 |     A, B, C, D, E> { | 
|---|
| 752 |  | 
|---|
| 753 |     typedef T* type; | 
|---|
| 754 | }; | 
|---|
| 755 |  | 
|---|
| 756 | ////////////////////////////////// | 
|---|
| 757 | template <typename T, typename TupleT, | 
|---|
| 758 |     typename A, typename B, typename C, typename D, typename E, | 
|---|
| 759 |     typename F> | 
|---|
| 760 | struct composite6_result<new_l<T>, TupleT, | 
|---|
| 761 |     A, B, C, D, E, F> { | 
|---|
| 762 |  | 
|---|
| 763 |     typedef T* type; | 
|---|
| 764 | }; | 
|---|
| 765 |  | 
|---|
| 766 | #if PHOENIX_LIMIT > 6 | 
|---|
| 767 | ////////////////////////////////// | 
|---|
| 768 | template <typename T, typename TupleT, | 
|---|
| 769 |     typename A, typename B, typename C, typename D, typename E, | 
|---|
| 770 |     typename F, typename G> | 
|---|
| 771 | struct composite7_result<new_l<T>, TupleT, | 
|---|
| 772 |     A, B, C, D, E, F, G> { | 
|---|
| 773 |  | 
|---|
| 774 |     typedef T* type; | 
|---|
| 775 | }; | 
|---|
| 776 |  | 
|---|
| 777 | ////////////////////////////////// | 
|---|
| 778 | template <typename T, typename TupleT, | 
|---|
| 779 |     typename A, typename B, typename C, typename D, typename E, | 
|---|
| 780 |     typename F, typename G, typename H> | 
|---|
| 781 | struct composite8_result<new_l<T>, TupleT, | 
|---|
| 782 |     A, B, C, D, E, F, G, H> { | 
|---|
| 783 |  | 
|---|
| 784 |     typedef T* type; | 
|---|
| 785 | }; | 
|---|
| 786 |  | 
|---|
| 787 | ////////////////////////////////// | 
|---|
| 788 | template <typename T, typename TupleT, | 
|---|
| 789 |     typename A, typename B, typename C, typename D, typename E, | 
|---|
| 790 |     typename F, typename G, typename H, typename I> | 
|---|
| 791 | struct composite9_result<new_l<T>, TupleT, | 
|---|
| 792 |     A, B, C, D, E, F, G, H, I> { | 
|---|
| 793 |  | 
|---|
| 794 |     typedef T* type; | 
|---|
| 795 | }; | 
|---|
| 796 |  | 
|---|
| 797 | #if PHOENIX_LIMIT > 9 | 
|---|
| 798 | ////////////////////////////////// | 
|---|
| 799 | template <typename T, typename TupleT, | 
|---|
| 800 |     typename A, typename B, typename C, typename D, typename E, | 
|---|
| 801 |     typename F, typename G, typename H, typename I, typename J> | 
|---|
| 802 | struct composite10_result<new_l<T>, TupleT, | 
|---|
| 803 |     A, B, C, D, E, F, G, H, I, J> { | 
|---|
| 804 |  | 
|---|
| 805 |     typedef T* type; | 
|---|
| 806 | }; | 
|---|
| 807 |  | 
|---|
| 808 | ////////////////////////////////// | 
|---|
| 809 | template <typename T, typename TupleT, | 
|---|
| 810 |     typename A, typename B, typename C, typename D, typename E, | 
|---|
| 811 |     typename F, typename G, typename H, typename I, typename J, | 
|---|
| 812 |     typename K> | 
|---|
| 813 | struct composite11_result<new_l<T>, TupleT, | 
|---|
| 814 |     A, B, C, D, E, F, G, H, I, J, K> { | 
|---|
| 815 |  | 
|---|
| 816 |     typedef T* type; | 
|---|
| 817 | }; | 
|---|
| 818 |  | 
|---|
| 819 | ////////////////////////////////// | 
|---|
| 820 | template <typename T, typename TupleT, | 
|---|
| 821 |     typename A, typename B, typename C, typename D, typename E, | 
|---|
| 822 |     typename F, typename G, typename H, typename I, typename J, | 
|---|
| 823 |     typename K, typename L> | 
|---|
| 824 | struct composite12_result<new_l<T>, TupleT, | 
|---|
| 825 |     A, B, C, D, E, F, G, H, I, J, K, L> { | 
|---|
| 826 |  | 
|---|
| 827 |     typedef T* type; | 
|---|
| 828 | }; | 
|---|
| 829 |  | 
|---|
| 830 | #if PHOENIX_LIMIT > 12 | 
|---|
| 831 | ////////////////////////////////// | 
|---|
| 832 | template <typename T, typename TupleT, | 
|---|
| 833 |     typename A, typename B, typename C, typename D, typename E, | 
|---|
| 834 |     typename F, typename G, typename H, typename I, typename J, | 
|---|
| 835 |     typename K, typename L, typename M> | 
|---|
| 836 | struct composite13_result<new_l<T>, TupleT, | 
|---|
| 837 |     A, B, C, D, E, F, G, H, I, J, K, L, M> { | 
|---|
| 838 |  | 
|---|
| 839 |     typedef T* type; | 
|---|
| 840 | }; | 
|---|
| 841 |  | 
|---|
| 842 | ////////////////////////////////// | 
|---|
| 843 | template <typename T, typename TupleT, | 
|---|
| 844 |     typename A, typename B, typename C, typename D, typename E, | 
|---|
| 845 |     typename F, typename G, typename H, typename I, typename J, | 
|---|
| 846 |     typename K, typename L, typename M, typename N> | 
|---|
| 847 | struct composite14_result<new_l<T>, TupleT, | 
|---|
| 848 |     A, B, C, D, E, F, G, H, I, J, K, L, M, N> { | 
|---|
| 849 |  | 
|---|
| 850 |     typedef T* type; | 
|---|
| 851 | }; | 
|---|
| 852 |  | 
|---|
| 853 | ////////////////////////////////// | 
|---|
| 854 | template <typename T, typename TupleT, | 
|---|
| 855 |     typename A, typename B, typename C, typename D, typename E, | 
|---|
| 856 |     typename F, typename G, typename H, typename I, typename J, | 
|---|
| 857 |     typename K, typename L, typename M, typename N, typename O> | 
|---|
| 858 | struct composite15_result<new_l<T>, TupleT, | 
|---|
| 859 |     A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> { | 
|---|
| 860 |  | 
|---|
| 861 |     typedef T* type; | 
|---|
| 862 | }; | 
|---|
| 863 |  | 
|---|
| 864 | #endif | 
|---|
| 865 | #endif | 
|---|
| 866 | #endif | 
|---|
| 867 | #endif | 
|---|
| 868 | #endif | 
|---|
| 869 |  | 
|---|
| 870 | ////////////////////////////////// | 
|---|
| 871 | template <typename T> | 
|---|
| 872 | inline typename impl::make_composite<new_l_0<T> >::type | 
|---|
| 873 | new_() | 
|---|
| 874 | { | 
|---|
| 875 |     typedef impl::make_composite<new_l_0<T> > make_composite_t; | 
|---|
| 876 |     typedef typename make_composite_t::type type_t; | 
|---|
| 877 |     typedef typename make_composite_t::composite_type composite_type_t; | 
|---|
| 878 |  | 
|---|
| 879 |     return type_t(composite_type_t(new_l_0<T>())); | 
|---|
| 880 | } | 
|---|
| 881 |  | 
|---|
| 882 | ////////////////////////////////// | 
|---|
| 883 | template <typename T, typename A> | 
|---|
| 884 | inline typename impl::make_composite<new_1<T>, A>::type | 
|---|
| 885 | new_(A const& a) | 
|---|
| 886 | { | 
|---|
| 887 |     typedef impl::make_composite<new_1<T>, A> make_composite_t; | 
|---|
| 888 |     typedef typename make_composite_t::type type_t; | 
|---|
| 889 |     typedef typename make_composite_t::composite_type composite_type_t; | 
|---|
| 890 |  | 
|---|
| 891 |     return type_t(composite_type_t(new_1<T>(), | 
|---|
| 892 |         as_actor<A>::convert(a) | 
|---|
| 893 |     )); | 
|---|
| 894 | } | 
|---|
| 895 |  | 
|---|
| 896 | ////////////////////////////////// | 
|---|
| 897 | template <typename T, typename A, typename B> | 
|---|
| 898 | inline typename impl::make_composite<new_2<T>, A, B>::type | 
|---|
| 899 | new_(A const& a, B const& b) | 
|---|
| 900 | { | 
|---|
| 901 |     typedef impl::make_composite<new_2<T>, A, B> make_composite_t; | 
|---|
| 902 |     typedef typename make_composite_t::type type_t; | 
|---|
| 903 |     typedef typename make_composite_t::composite_type composite_type_t; | 
|---|
| 904 |  | 
|---|
| 905 |     return type_t(composite_type_t(new_2<T>(), | 
|---|
| 906 |         as_actor<A>::convert(a), | 
|---|
| 907 |         as_actor<B>::convert(b) | 
|---|
| 908 |     )); | 
|---|
| 909 | } | 
|---|
| 910 |  | 
|---|
| 911 | ////////////////////////////////// | 
|---|
| 912 | template <typename T, typename A, typename B, typename C> | 
|---|
| 913 | inline typename impl::make_composite<new_3<T>, A, B, C>::type | 
|---|
| 914 | new_(A const& a, B const& b, C const& c) | 
|---|
| 915 | { | 
|---|
| 916 |     typedef impl::make_composite<new_3<T>, A, B, C> make_composite_t; | 
|---|
| 917 |     typedef typename make_composite_t::type type_t; | 
|---|
| 918 |     typedef typename make_composite_t::composite_type composite_type_t; | 
|---|
| 919 |  | 
|---|
| 920 |     return type_t(composite_type_t(new_3<T>(), | 
|---|
| 921 |         as_actor<A>::convert(a), | 
|---|
| 922 |         as_actor<B>::convert(b), | 
|---|
| 923 |         as_actor<C>::convert(c) | 
|---|
| 924 |     )); | 
|---|
| 925 | } | 
|---|
| 926 |  | 
|---|
| 927 | #if PHOENIX_CONSTRUCT_LIMIT > 3 | 
|---|
| 928 | ////////////////////////////////// | 
|---|
| 929 | template < | 
|---|
| 930 |     typename T, typename A, typename B, typename C, typename D | 
|---|
| 931 | > | 
|---|
| 932 | inline typename impl::make_composite<new_4<T>, A, B, C, D>::type | 
|---|
| 933 | new_( | 
|---|
| 934 |     A const& a, B const& b, C const& c, D const& d) | 
|---|
| 935 | { | 
|---|
| 936 |     typedef | 
|---|
| 937 |         impl::make_composite<new_4<T>, A, B, C, D> | 
|---|
| 938 |         make_composite_t; | 
|---|
| 939 |     typedef typename make_composite_t::type type_t; | 
|---|
| 940 |     typedef typename make_composite_t::composite_type composite_type_t; | 
|---|
| 941 |  | 
|---|
| 942 |     return type_t(composite_type_t(new_4<T>(), | 
|---|
| 943 |         as_actor<A>::convert(a), | 
|---|
| 944 |         as_actor<B>::convert(b), | 
|---|
| 945 |         as_actor<C>::convert(c), | 
|---|
| 946 |         as_actor<D>::convert(d) | 
|---|
| 947 |     )); | 
|---|
| 948 | } | 
|---|
| 949 |  | 
|---|
| 950 | ////////////////////////////////// | 
|---|
| 951 | template < | 
|---|
| 952 |     typename T, typename A, typename B, typename C, typename D, typename E | 
|---|
| 953 | > | 
|---|
| 954 | inline typename impl::make_composite<new_5<T>, A, B, C, D, E>::type | 
|---|
| 955 | new_( | 
|---|
| 956 |     A const& a, B const& b, C const& c, D const& d, E const& e) | 
|---|
| 957 | { | 
|---|
| 958 |     typedef | 
|---|
| 959 |         impl::make_composite<new_5<T>, A, B, C, D, E> | 
|---|
| 960 |         make_composite_t; | 
|---|
| 961 |     typedef typename make_composite_t::type type_t; | 
|---|
| 962 |     typedef typename make_composite_t::composite_type composite_type_t; | 
|---|
| 963 |  | 
|---|
| 964 |     return type_t(composite_type_t(new_5<T>(), | 
|---|
| 965 |         as_actor<A>::convert(a), | 
|---|
| 966 |         as_actor<B>::convert(b), | 
|---|
| 967 |         as_actor<C>::convert(c), | 
|---|
| 968 |         as_actor<D>::convert(d), | 
|---|
| 969 |         as_actor<E>::convert(e) | 
|---|
| 970 |     )); | 
|---|
| 971 | } | 
|---|
| 972 |  | 
|---|
| 973 | ////////////////////////////////// | 
|---|
| 974 | template < | 
|---|
| 975 |     typename T, typename A, typename B, typename C, typename D, typename E, | 
|---|
| 976 |     typename F | 
|---|
| 977 | > | 
|---|
| 978 | inline typename impl::make_composite<new_6<T>, A, B, C, D, E, F>::type | 
|---|
| 979 | new_( | 
|---|
| 980 |     A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 981 |     F const& f) | 
|---|
| 982 | { | 
|---|
| 983 |     typedef | 
|---|
| 984 |         impl::make_composite<new_6<T>, A, B, C, D, E, F> | 
|---|
| 985 |         make_composite_t; | 
|---|
| 986 |     typedef typename make_composite_t::type type_t; | 
|---|
| 987 |     typedef typename make_composite_t::composite_type composite_type_t; | 
|---|
| 988 |  | 
|---|
| 989 |     return type_t(composite_type_t(new_6<T>(), | 
|---|
| 990 |         as_actor<A>::convert(a), | 
|---|
| 991 |         as_actor<B>::convert(b), | 
|---|
| 992 |         as_actor<C>::convert(c), | 
|---|
| 993 |         as_actor<D>::convert(d), | 
|---|
| 994 |         as_actor<E>::convert(e), | 
|---|
| 995 |         as_actor<F>::convert(f) | 
|---|
| 996 |     )); | 
|---|
| 997 | } | 
|---|
| 998 |  | 
|---|
| 999 | #if PHOENIX_CONSTRUCT_LIMIT > 6 | 
|---|
| 1000 | ////////////////////////////////// | 
|---|
| 1001 | template < | 
|---|
| 1002 |     typename T, typename A, typename B, typename C, typename D, typename E, | 
|---|
| 1003 |     typename F, typename G | 
|---|
| 1004 | > | 
|---|
| 1005 | inline typename impl::make_composite<new_7<T>, A, B, C, D, E, F, G>::type | 
|---|
| 1006 | new_( | 
|---|
| 1007 |     A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 1008 |     F const& f, G const& g) | 
|---|
| 1009 | { | 
|---|
| 1010 |     typedef | 
|---|
| 1011 |         impl::make_composite<new_7<T>, A, B, C, D, E, F, G> | 
|---|
| 1012 |         make_composite_t; | 
|---|
| 1013 |     typedef typename make_composite_t::type type_t; | 
|---|
| 1014 |     typedef typename make_composite_t::composite_type composite_type_t; | 
|---|
| 1015 |  | 
|---|
| 1016 |     return type_t(composite_type_t(new_7<T>(), | 
|---|
| 1017 |         as_actor<A>::convert(a), | 
|---|
| 1018 |         as_actor<B>::convert(b), | 
|---|
| 1019 |         as_actor<C>::convert(c), | 
|---|
| 1020 |         as_actor<D>::convert(d), | 
|---|
| 1021 |         as_actor<E>::convert(e), | 
|---|
| 1022 |         as_actor<F>::convert(f), | 
|---|
| 1023 |         as_actor<G>::convert(g) | 
|---|
| 1024 |     )); | 
|---|
| 1025 | } | 
|---|
| 1026 |  | 
|---|
| 1027 | ////////////////////////////////// | 
|---|
| 1028 | template < | 
|---|
| 1029 |     typename T, typename A, typename B, typename C, typename D, typename E, | 
|---|
| 1030 |     typename F, typename G, typename H | 
|---|
| 1031 | > | 
|---|
| 1032 | inline typename impl::make_composite<new_8<T>, A, B, C, D, E, F, G, H>::type | 
|---|
| 1033 | new_( | 
|---|
| 1034 |     A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 1035 |     F const& f, G const& g, H const& h) | 
|---|
| 1036 | { | 
|---|
| 1037 |     typedef | 
|---|
| 1038 |         impl::make_composite<new_8<T>, A, B, C, D, E, F, G, H> | 
|---|
| 1039 |         make_composite_t; | 
|---|
| 1040 |     typedef typename make_composite_t::type type_t; | 
|---|
| 1041 |     typedef typename make_composite_t::composite_type composite_type_t; | 
|---|
| 1042 |  | 
|---|
| 1043 |     return type_t(composite_type_t(new_8<T>(), | 
|---|
| 1044 |         as_actor<A>::convert(a), | 
|---|
| 1045 |         as_actor<B>::convert(b), | 
|---|
| 1046 |         as_actor<C>::convert(c), | 
|---|
| 1047 |         as_actor<D>::convert(d), | 
|---|
| 1048 |         as_actor<E>::convert(e), | 
|---|
| 1049 |         as_actor<F>::convert(f), | 
|---|
| 1050 |         as_actor<G>::convert(g), | 
|---|
| 1051 |         as_actor<H>::convert(h) | 
|---|
| 1052 |     )); | 
|---|
| 1053 | } | 
|---|
| 1054 |  | 
|---|
| 1055 | ////////////////////////////////// | 
|---|
| 1056 | template < | 
|---|
| 1057 |     typename T, typename A, typename B, typename C, typename D, typename E, | 
|---|
| 1058 |     typename F, typename G, typename H, typename I | 
|---|
| 1059 | > | 
|---|
| 1060 | inline typename impl::make_composite<new_9<T>, A, B, C, D, E, F, G, H, I>::type | 
|---|
| 1061 | new_( | 
|---|
| 1062 |     A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 1063 |     F const& f, G const& g, H const& h, I const& i) | 
|---|
| 1064 | { | 
|---|
| 1065 |     typedef | 
|---|
| 1066 |         impl::make_composite<new_9<T>, A, B, C, D, E, F, G, H, I> | 
|---|
| 1067 |         make_composite_t; | 
|---|
| 1068 |     typedef typename make_composite_t::type type_t; | 
|---|
| 1069 |     typedef typename make_composite_t::composite_type composite_type_t; | 
|---|
| 1070 |  | 
|---|
| 1071 |     return type_t(composite_type_t(new_9<T>(), | 
|---|
| 1072 |         as_actor<A>::convert(a), | 
|---|
| 1073 |         as_actor<B>::convert(b), | 
|---|
| 1074 |         as_actor<C>::convert(c), | 
|---|
| 1075 |         as_actor<D>::convert(d), | 
|---|
| 1076 |         as_actor<E>::convert(e), | 
|---|
| 1077 |         as_actor<F>::convert(f), | 
|---|
| 1078 |         as_actor<G>::convert(g), | 
|---|
| 1079 |         as_actor<H>::convert(h), | 
|---|
| 1080 |         as_actor<I>::convert(i) | 
|---|
| 1081 |     )); | 
|---|
| 1082 | } | 
|---|
| 1083 |  | 
|---|
| 1084 | #if PHOENIX_CONSTRUCT_LIMIT > 9 | 
|---|
| 1085 | ////////////////////////////////// | 
|---|
| 1086 | template < | 
|---|
| 1087 |     typename T, typename A, typename B, typename C, typename D, typename E, | 
|---|
| 1088 |     typename F, typename G, typename H, typename I, typename J | 
|---|
| 1089 | > | 
|---|
| 1090 | inline typename impl::make_composite< | 
|---|
| 1091 |     new_10<T>, A, B, C, D, E, F, G, H, I, J>::type | 
|---|
| 1092 | new_( | 
|---|
| 1093 |     A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 1094 |     F const& f, G const& g, H const& h, I const& i, J const& j) | 
|---|
| 1095 | { | 
|---|
| 1096 |     typedef | 
|---|
| 1097 |         impl::make_composite< | 
|---|
| 1098 |             new_10<T>, A, B, C, D, E, F, G, H, I, J | 
|---|
| 1099 |         > | 
|---|
| 1100 |         make_composite_t; | 
|---|
| 1101 |     typedef typename make_composite_t::type type_t; | 
|---|
| 1102 |     typedef typename make_composite_t::composite_type composite_type_t; | 
|---|
| 1103 |  | 
|---|
| 1104 |     return type_t(composite_type_t(new_10<T>(), | 
|---|
| 1105 |         as_actor<A>::convert(a), | 
|---|
| 1106 |         as_actor<B>::convert(b), | 
|---|
| 1107 |         as_actor<C>::convert(c), | 
|---|
| 1108 |         as_actor<D>::convert(d), | 
|---|
| 1109 |         as_actor<E>::convert(e), | 
|---|
| 1110 |         as_actor<F>::convert(f), | 
|---|
| 1111 |         as_actor<G>::convert(g), | 
|---|
| 1112 |         as_actor<H>::convert(h), | 
|---|
| 1113 |         as_actor<I>::convert(i), | 
|---|
| 1114 |         as_actor<J>::convert(j) | 
|---|
| 1115 |     )); | 
|---|
| 1116 | } | 
|---|
| 1117 |  | 
|---|
| 1118 | ////////////////////////////////// | 
|---|
| 1119 | template < | 
|---|
| 1120 |     typename T, typename A, typename B, typename C, typename D, typename E, | 
|---|
| 1121 |     typename F, typename G, typename H, typename I, typename J, typename K | 
|---|
| 1122 | > | 
|---|
| 1123 | inline typename impl::make_composite< | 
|---|
| 1124 |     new_11<T>, A, B, C, D, E, F, G, H, I, J, K>::type | 
|---|
| 1125 | new_( | 
|---|
| 1126 |     A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 1127 |     F const& f, G const& g, H const& h, I const& i, J const& j, | 
|---|
| 1128 |     K const& k) | 
|---|
| 1129 | { | 
|---|
| 1130 |     typedef | 
|---|
| 1131 |         impl::make_composite< | 
|---|
| 1132 |             new_11<T>, A, B, C, D, E, F, G, H, I, J, K | 
|---|
| 1133 |         > | 
|---|
| 1134 |         make_composite_t; | 
|---|
| 1135 |     typedef typename make_composite_t::type type_t; | 
|---|
| 1136 |     typedef typename make_composite_t::composite_type composite_type_t; | 
|---|
| 1137 |  | 
|---|
| 1138 |     return type_t(composite_type_t(new_11<T>(), | 
|---|
| 1139 |         as_actor<A>::convert(a), | 
|---|
| 1140 |         as_actor<B>::convert(b), | 
|---|
| 1141 |         as_actor<C>::convert(c), | 
|---|
| 1142 |         as_actor<D>::convert(d), | 
|---|
| 1143 |         as_actor<E>::convert(e), | 
|---|
| 1144 |         as_actor<F>::convert(f), | 
|---|
| 1145 |         as_actor<G>::convert(g), | 
|---|
| 1146 |         as_actor<H>::convert(h), | 
|---|
| 1147 |         as_actor<I>::convert(i), | 
|---|
| 1148 |         as_actor<J>::convert(j), | 
|---|
| 1149 |         as_actor<K>::convert(k) | 
|---|
| 1150 |     )); | 
|---|
| 1151 | } | 
|---|
| 1152 |  | 
|---|
| 1153 | ////////////////////////////////// | 
|---|
| 1154 | template < | 
|---|
| 1155 |     typename T, typename A, typename B, typename C, typename D, typename E, | 
|---|
| 1156 |     typename F, typename G, typename H, typename I, typename J, typename K, | 
|---|
| 1157 |     typename L | 
|---|
| 1158 | > | 
|---|
| 1159 | inline typename impl::make_composite< | 
|---|
| 1160 |     new_12<T>, A, B, C, D, E, F, G, H, I, J, K, L>::type | 
|---|
| 1161 | new_( | 
|---|
| 1162 |     A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 1163 |     F const& f, G const& g, H const& h, I const& i, J const& j, | 
|---|
| 1164 |     K const& k, L const& l) | 
|---|
| 1165 | { | 
|---|
| 1166 |     typedef | 
|---|
| 1167 |         impl::make_composite< | 
|---|
| 1168 |             new_12<T>, A, B, C, D, E, F, G, H, I, J, K, L | 
|---|
| 1169 |         > | 
|---|
| 1170 |         make_composite_t; | 
|---|
| 1171 |     typedef typename make_composite_t::type type_t; | 
|---|
| 1172 |     typedef typename make_composite_t::composite_type composite_type_t; | 
|---|
| 1173 |  | 
|---|
| 1174 |     return type_t(composite_type_t(new_12<T>(), | 
|---|
| 1175 |         as_actor<A>::convert(a), | 
|---|
| 1176 |         as_actor<B>::convert(b), | 
|---|
| 1177 |         as_actor<C>::convert(c), | 
|---|
| 1178 |         as_actor<D>::convert(d), | 
|---|
| 1179 |         as_actor<E>::convert(e), | 
|---|
| 1180 |         as_actor<F>::convert(f), | 
|---|
| 1181 |         as_actor<G>::convert(g), | 
|---|
| 1182 |         as_actor<H>::convert(h), | 
|---|
| 1183 |         as_actor<I>::convert(i), | 
|---|
| 1184 |         as_actor<J>::convert(j), | 
|---|
| 1185 |         as_actor<K>::convert(k), | 
|---|
| 1186 |         as_actor<L>::convert(l) | 
|---|
| 1187 |     )); | 
|---|
| 1188 | } | 
|---|
| 1189 |  | 
|---|
| 1190 | #if PHOENIX_CONSTRUCT_LIMIT > 12 | 
|---|
| 1191 | ////////////////////////////////// | 
|---|
| 1192 | template < | 
|---|
| 1193 |     typename T, typename A, typename B, typename C, typename D, typename E, | 
|---|
| 1194 |     typename F, typename G, typename H, typename I, typename J, typename K, | 
|---|
| 1195 |     typename L, typename M | 
|---|
| 1196 | > | 
|---|
| 1197 | inline typename impl::make_composite< | 
|---|
| 1198 |     new_13<T>, A, B, C, D, E, F, G, H, I, J, K, L, M>::type | 
|---|
| 1199 | new_( | 
|---|
| 1200 |     A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 1201 |     F const& f, G const& g, H const& h, I const& i, J const& j, | 
|---|
| 1202 |     K const& k, L const& l, M const& m) | 
|---|
| 1203 | { | 
|---|
| 1204 |     typedef | 
|---|
| 1205 |         impl::make_composite< | 
|---|
| 1206 |             new_13<T>, A, B, C, D, E, F, G, H, I, J, K, L, M | 
|---|
| 1207 |         > | 
|---|
| 1208 |         make_composite_t; | 
|---|
| 1209 |     typedef typename make_composite_t::type type_t; | 
|---|
| 1210 |     typedef typename make_composite_t::composite_type composite_type_t; | 
|---|
| 1211 |  | 
|---|
| 1212 |     return type_t(composite_type_t(new_13<T>(), | 
|---|
| 1213 |         as_actor<A>::convert(a), | 
|---|
| 1214 |         as_actor<B>::convert(b), | 
|---|
| 1215 |         as_actor<C>::convert(c), | 
|---|
| 1216 |         as_actor<D>::convert(d), | 
|---|
| 1217 |         as_actor<E>::convert(e), | 
|---|
| 1218 |         as_actor<F>::convert(f), | 
|---|
| 1219 |         as_actor<G>::convert(g), | 
|---|
| 1220 |         as_actor<H>::convert(h), | 
|---|
| 1221 |         as_actor<I>::convert(i), | 
|---|
| 1222 |         as_actor<J>::convert(j), | 
|---|
| 1223 |         as_actor<K>::convert(k), | 
|---|
| 1224 |         as_actor<L>::convert(l), | 
|---|
| 1225 |         as_actor<M>::convert(m) | 
|---|
| 1226 |     )); | 
|---|
| 1227 | } | 
|---|
| 1228 |  | 
|---|
| 1229 | ////////////////////////////////// | 
|---|
| 1230 | template < | 
|---|
| 1231 |     typename T, typename A, typename B, typename C, typename D, typename E, | 
|---|
| 1232 |     typename F, typename G, typename H, typename I, typename J, typename K, | 
|---|
| 1233 |     typename L, typename M, typename N | 
|---|
| 1234 | > | 
|---|
| 1235 | inline typename impl::make_composite< | 
|---|
| 1236 |     new_14<T>, A, B, C, D, E, F, G, H, I, J, K, L, M>::type | 
|---|
| 1237 | new_( | 
|---|
| 1238 |     A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 1239 |     F const& f, G const& g, H const& h, I const& i, J const& j, | 
|---|
| 1240 |     K const& k, L const& l, M const& m, N const& n) | 
|---|
| 1241 | { | 
|---|
| 1242 |     typedef | 
|---|
| 1243 |         impl::make_composite< | 
|---|
| 1244 |             new_14<T>, A, B, C, D, E, F, G, H, I, J, K, L, M, N | 
|---|
| 1245 |         > | 
|---|
| 1246 |         make_composite_t; | 
|---|
| 1247 |     typedef typename make_composite_t::type type_t; | 
|---|
| 1248 |     typedef typename make_composite_t::composite_type composite_type_t; | 
|---|
| 1249 |  | 
|---|
| 1250 |     return type_t(composite_type_t(new_14<T>(), | 
|---|
| 1251 |         as_actor<A>::convert(a), | 
|---|
| 1252 |         as_actor<B>::convert(b), | 
|---|
| 1253 |         as_actor<C>::convert(c), | 
|---|
| 1254 |         as_actor<D>::convert(d), | 
|---|
| 1255 |         as_actor<E>::convert(e), | 
|---|
| 1256 |         as_actor<F>::convert(f), | 
|---|
| 1257 |         as_actor<G>::convert(g), | 
|---|
| 1258 |         as_actor<H>::convert(h), | 
|---|
| 1259 |         as_actor<I>::convert(i), | 
|---|
| 1260 |         as_actor<J>::convert(j), | 
|---|
| 1261 |         as_actor<K>::convert(k), | 
|---|
| 1262 |         as_actor<L>::convert(l), | 
|---|
| 1263 |         as_actor<M>::convert(m), | 
|---|
| 1264 |         as_actor<N>::convert(n) | 
|---|
| 1265 |     )); | 
|---|
| 1266 | } | 
|---|
| 1267 |  | 
|---|
| 1268 | ////////////////////////////////// | 
|---|
| 1269 | template < | 
|---|
| 1270 |     typename T, typename A, typename B, typename C, typename D, typename E, | 
|---|
| 1271 |     typename F, typename G, typename H, typename I, typename J, typename K, | 
|---|
| 1272 |     typename L, typename M, typename N, typename O | 
|---|
| 1273 | > | 
|---|
| 1274 | inline typename impl::make_composite< | 
|---|
| 1275 |     new_15<T>, A, B, C, D, E, F, G, H, I, J, K, L, M, O>::type | 
|---|
| 1276 | new_( | 
|---|
| 1277 |     A const& a, B const& b, C const& c, D const& d, E const& e, | 
|---|
| 1278 |     F const& f, G const& g, H const& h, I const& i, J const& j, | 
|---|
| 1279 |     K const& k, L const& l, M const& m, N const& n, O const& o) | 
|---|
| 1280 | { | 
|---|
| 1281 |     typedef | 
|---|
| 1282 |         impl::make_composite< | 
|---|
| 1283 |             new_15<T>, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O | 
|---|
| 1284 |         > | 
|---|
| 1285 |         make_composite_t; | 
|---|
| 1286 |     typedef typename make_composite_t::type type_t; | 
|---|
| 1287 |     typedef typename make_composite_t::composite_type composite_type_t; | 
|---|
| 1288 |  | 
|---|
| 1289 |     return type_t(composite_type_t(new_15<T>(), | 
|---|
| 1290 |         as_actor<A>::convert(a), | 
|---|
| 1291 |         as_actor<B>::convert(b), | 
|---|
| 1292 |         as_actor<C>::convert(c), | 
|---|
| 1293 |         as_actor<D>::convert(d), | 
|---|
| 1294 |         as_actor<E>::convert(e), | 
|---|
| 1295 |         as_actor<F>::convert(f), | 
|---|
| 1296 |         as_actor<G>::convert(g), | 
|---|
| 1297 |         as_actor<H>::convert(h), | 
|---|
| 1298 |         as_actor<I>::convert(i), | 
|---|
| 1299 |         as_actor<J>::convert(j), | 
|---|
| 1300 |         as_actor<K>::convert(k), | 
|---|
| 1301 |         as_actor<L>::convert(l), | 
|---|
| 1302 |         as_actor<M>::convert(m), | 
|---|
| 1303 |         as_actor<N>::convert(n), | 
|---|
| 1304 |         as_actor<O>::convert(o) | 
|---|
| 1305 |     )); | 
|---|
| 1306 | } | 
|---|
| 1307 |  | 
|---|
| 1308 | #endif | 
|---|
| 1309 | #endif | 
|---|
| 1310 | #endif | 
|---|
| 1311 | #endif | 
|---|
| 1312 |  | 
|---|
| 1313 | /////////////////////////////////////////////////////////////////////////////// | 
|---|
| 1314 | }   //  namespace phoenix | 
|---|
| 1315 |  | 
|---|
| 1316 | #endif // PHOENIX_NEW_HPP | 
|---|