sl@0: /*============================================================================= sl@0: Phoenix V1.2.1 sl@0: Copyright (c) 2001-2002 Joel de Guzman sl@0: sl@0: Use, modification and distribution is subject to the Boost Software sl@0: License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at sl@0: http://www.boost.org/LICENSE_1_0.txt) sl@0: ==============================================================================*/ sl@0: #ifndef PHOENIX_FUNCTIONS_HPP sl@0: #define PHOENIX_FUNCTIONS_HPP sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: #include sl@0: #include sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: namespace phoenix { sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // sl@0: // function class sl@0: // sl@0: // Lazy functions sl@0: // sl@0: // This class provides a mechanism for lazily evaluating functions. sl@0: // Syntactically, a lazy function looks like an ordinary C/C++ sl@0: // function. The function call looks the same. However, unlike sl@0: // ordinary functions, the actual function execution is deferred. sl@0: // (see actor.hpp, primitives.hpp and composite.hpp for an sl@0: // overview). For example here are sample factorial function calls: sl@0: // sl@0: // factorial(4) sl@0: // factorial(arg1) sl@0: // factorial(arg1 * 6) sl@0: // sl@0: // These functions are automatically lazily bound unlike ordinary sl@0: // function pointers or functor objects that need to be explicitly sl@0: // bound through the bind function (see binders.hpp). sl@0: // sl@0: // A lazy function works in conjunction with a user defined functor sl@0: // (as usual with a member operator()). Only special forms of sl@0: // functor objects are allowed. This is required to enable true sl@0: // polymorphism (STL style monomorphic functors and function sl@0: // pointers can still be used through the bind facility in sl@0: // binders.hpp). sl@0: // sl@0: // This special functor is expected to have a nested template class sl@0: // result (where N is the number of arguments of its sl@0: // member operator()). The nested template class result should have sl@0: // a typedef 'type' that reflects the return type of its member sl@0: // operator(). This is essentially a type computer that answers the sl@0: // metaprogramming question "Given arguments of type A...TN, what sl@0: // will be the operator()'s return type?". sl@0: // sl@0: // There is a special case for functors that accept no arguments. sl@0: // Such nullary functors are only required to define a typedef sl@0: // result_type that reflects the return type of its operator(). sl@0: // sl@0: // Here's an example of a simple functor that computes the sl@0: // factorial of a number: sl@0: // sl@0: // struct factorial_impl { sl@0: // sl@0: // template sl@0: // struct result { typedef Arg type; }; sl@0: // sl@0: // template sl@0: // Arg operator()(Arg n) const sl@0: // { return (n <= 0) ? 1 : n * this->operator()(n-1); } sl@0: // }; sl@0: // sl@0: // As can be seen, the functor can be polymorphic. Its arguments sl@0: // and return type are not fixed to a particular type. The example sl@0: // above for example, can handle any type as long as it can carry sl@0: // out the required operations (i.e. <=, * and -). sl@0: // sl@0: // We can now declare and instantiate a lazy 'factorial' function: sl@0: // sl@0: // function factorial; sl@0: // sl@0: // Invoking a lazy function 'factorial' does not immediately sl@0: // execute the functor factorial_impl. Instead, a composite (see sl@0: // composite.hpp) object is created and returned to the caller. sl@0: // Example: sl@0: // sl@0: // factorial(arg1) sl@0: // sl@0: // does nothing more than return a composite. A second function sl@0: // call will invoke the actual factorial function. Example: sl@0: // sl@0: // int i = 4; sl@0: // cout << factorial(arg1)(i); sl@0: // sl@0: // will print out "24". sl@0: // sl@0: // Take note that in certain cases (e.g. for functors with state), sl@0: // an instance may be passed on to the constructor. Example: sl@0: // sl@0: // function factorial(ftor); sl@0: // sl@0: // where ftor is an instance of factorial_impl (this is not sl@0: // necessary in this case since factorial is a simple stateless sl@0: // functor). Take care though when using functors with state sl@0: // because the functors are taken in by value. It is best to keep sl@0: // the data manipulated by a functor outside the functor itself and sl@0: // keep a reference to this data inside the functor. Also, it is sl@0: // best to keep functors as small as possible. sl@0: // sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: template sl@0: struct function { sl@0: sl@0: function() : op() {} sl@0: function(OperationT const& op_) : op(op_) {} sl@0: sl@0: actor > sl@0: operator()() const; sl@0: sl@0: template sl@0: typename impl::make_composite::type sl@0: operator()(A const& a) const; sl@0: sl@0: template sl@0: typename impl::make_composite::type sl@0: operator()(A const& a, B const& b) const; sl@0: sl@0: template sl@0: typename impl::make_composite::type sl@0: operator()(A const& a, B const& b, C const& c) const; sl@0: sl@0: #if PHOENIX_LIMIT > 3 sl@0: sl@0: template sl@0: typename impl::make_composite::type sl@0: operator()(A const& a, B const& b, C const& c, D const& d) const; sl@0: sl@0: template sl@0: typename impl::make_composite< sl@0: OperationT, A, B, C, D, E sl@0: >::type sl@0: operator()( sl@0: A const& a, B const& b, C const& c, D const& d, E const& e sl@0: ) const; sl@0: sl@0: template < sl@0: typename A, typename B, typename C, typename D, typename E, sl@0: typename F sl@0: > sl@0: typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F sl@0: >::type sl@0: operator()( sl@0: A const& a, B const& b, C const& c, D const& d, E const& e, sl@0: F const& f sl@0: ) const; sl@0: sl@0: #if PHOENIX_LIMIT > 6 sl@0: sl@0: template < sl@0: typename A, typename B, typename C, typename D, typename E, sl@0: typename F, typename G sl@0: > sl@0: typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G sl@0: >::type sl@0: operator()( sl@0: A const& a, B const& b, C const& c, D const& d, E const& e, sl@0: F const& f, G const& g sl@0: ) const; sl@0: sl@0: template < sl@0: typename A, typename B, typename C, typename D, typename E, sl@0: typename F, typename G, typename H sl@0: > sl@0: typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G, H sl@0: >::type sl@0: operator()( sl@0: A const& a, B const& b, C const& c, D const& d, E const& e, sl@0: F const& f, G const& g, H const& h sl@0: ) const; sl@0: sl@0: template < sl@0: typename A, typename B, typename C, typename D, typename E, sl@0: typename F, typename G, typename H, typename I sl@0: > sl@0: typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G, H, I sl@0: >::type sl@0: operator()( sl@0: A const& a, B const& b, C const& c, D const& d, E const& e, sl@0: F const& f, G const& g, H const& h, I const& i sl@0: ) const; sl@0: sl@0: #if PHOENIX_LIMIT > 9 sl@0: sl@0: template < sl@0: typename A, typename B, typename C, typename D, typename E, sl@0: typename F, typename G, typename H, typename I, typename J sl@0: > sl@0: typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G, H, I, J sl@0: >::type sl@0: operator()( sl@0: A const& a, B const& b, C const& c, D const& d, E const& e, sl@0: F const& f, G const& g, H const& h, I const& i, J const& j sl@0: ) const; sl@0: sl@0: template < sl@0: typename A, typename B, typename C, typename D, typename E, sl@0: typename F, typename G, typename H, typename I, typename J, sl@0: typename K sl@0: > sl@0: typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G, H, I, J, K sl@0: >::type sl@0: operator()( sl@0: A const& a, B const& b, C const& c, D const& d, E const& e, sl@0: F const& f, G const& g, H const& h, I const& i, J const& j, sl@0: K const& k sl@0: ) const; sl@0: sl@0: template < sl@0: typename A, typename B, typename C, typename D, typename E, sl@0: typename F, typename G, typename H, typename I, typename J, sl@0: typename K, typename L sl@0: > sl@0: typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G, H, I, J, K, L sl@0: >::type sl@0: operator()( sl@0: A const& a, B const& b, C const& c, D const& d, E const& e, sl@0: F const& f, G const& g, H const& h, I const& i, J const& j, sl@0: K const& k, L const& l sl@0: ) const; sl@0: sl@0: #if PHOENIX_LIMIT > 12 sl@0: sl@0: template < sl@0: typename A, typename B, typename C, typename D, typename E, sl@0: typename F, typename G, typename H, typename I, typename J, sl@0: typename K, typename L, typename M sl@0: > sl@0: typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G, H, I, J, K, L, M sl@0: >::type sl@0: operator()( sl@0: A const& a, B const& b, C const& c, D const& d, E const& e, sl@0: F const& f, G const& g, H const& h, I const& i, J const& j, sl@0: K const& k, L const& l, M const& m sl@0: ) const; sl@0: sl@0: template < sl@0: typename A, typename B, typename C, typename D, typename E, sl@0: typename F, typename G, typename H, typename I, typename J, sl@0: typename K, typename L, typename M, typename N sl@0: > sl@0: typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G, H, I, J, K, L, M, N sl@0: >::type sl@0: operator()( sl@0: A const& a, B const& b, C const& c, D const& d, E const& e, sl@0: F const& f, G const& g, H const& h, I const& i, J const& j, sl@0: K const& k, L const& l, M const& m, N const& n sl@0: ) const; sl@0: sl@0: template < sl@0: typename A, typename B, typename C, typename D, typename E, sl@0: typename F, typename G, typename H, typename I, typename J, sl@0: typename K, typename L, typename M, typename N, typename O sl@0: > sl@0: typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O sl@0: >::type sl@0: operator()( sl@0: A const& a, B const& b, C const& c, D const& d, E const& e, sl@0: F const& f, G const& g, H const& h, I const& i, J const& j, sl@0: K const& k, L const& l, M const& m, N const& n, O const& o sl@0: ) const; sl@0: sl@0: #endif sl@0: #endif sl@0: #endif sl@0: #endif sl@0: sl@0: OperationT op; sl@0: }; sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // sl@0: // function class implementation sl@0: // sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: template sl@0: inline actor > sl@0: function::operator()() const sl@0: { sl@0: return actor >(op); sl@0: } sl@0: sl@0: ////////////////////////////////// sl@0: template sl@0: template sl@0: inline typename impl::make_composite::type sl@0: function::operator()(A const& a) const sl@0: { sl@0: typedef typename impl::make_composite::composite_type ret_t; sl@0: return ret_t sl@0: ( sl@0: op, sl@0: as_actor::convert(a) sl@0: ); sl@0: } sl@0: sl@0: ////////////////////////////////// sl@0: template sl@0: template sl@0: inline typename impl::make_composite::type sl@0: function::operator()(A const& a, B const& b) const sl@0: { sl@0: typedef sl@0: typename impl::make_composite::composite_type sl@0: ret_t; sl@0: sl@0: return ret_t( sl@0: op, sl@0: as_actor::convert(a), sl@0: as_actor::convert(b) sl@0: ); sl@0: } sl@0: sl@0: ////////////////////////////////// sl@0: template sl@0: template sl@0: inline typename impl::make_composite::type sl@0: function::operator()(A const& a, B const& b, C const& c) const sl@0: { sl@0: typedef sl@0: typename impl::make_composite::composite_type sl@0: ret_t; sl@0: sl@0: return ret_t( sl@0: op, sl@0: as_actor::convert(a), sl@0: as_actor::convert(b), sl@0: as_actor::convert(c) sl@0: ); sl@0: } sl@0: sl@0: #if PHOENIX_LIMIT > 3 sl@0: ////////////////////////////////// sl@0: template sl@0: template < sl@0: typename A, typename B, typename C, typename D sl@0: > sl@0: inline typename impl::make_composite< sl@0: OperationT, A, B, C, D sl@0: >::type sl@0: function::operator()( sl@0: A const& a, B const& b, C const& c, D const& d sl@0: ) const sl@0: { sl@0: typedef typename impl::make_composite< sl@0: OperationT, A, B, C, D sl@0: >::composite_type ret_t; sl@0: sl@0: return ret_t( sl@0: op, sl@0: as_actor::convert(a), sl@0: as_actor::convert(b), sl@0: as_actor::convert(c), sl@0: as_actor::convert(d) sl@0: ); sl@0: } sl@0: sl@0: ////////////////////////////////// sl@0: template sl@0: template < sl@0: typename A, typename B, typename C, typename D, typename E sl@0: > sl@0: inline typename impl::make_composite< sl@0: OperationT, A, B, C, D, E sl@0: >::type sl@0: function::operator()( sl@0: A const& a, B const& b, C const& c, D const& d, E const& e sl@0: ) const sl@0: { sl@0: typedef typename impl::make_composite< sl@0: OperationT, A, B, C, D, E sl@0: >::composite_type ret_t; sl@0: sl@0: return ret_t( sl@0: op, sl@0: as_actor::convert(a), sl@0: as_actor::convert(b), sl@0: as_actor::convert(c), sl@0: as_actor::convert(d), sl@0: as_actor::convert(e) sl@0: ); sl@0: } sl@0: sl@0: ////////////////////////////////// sl@0: template sl@0: template < sl@0: typename A, typename B, typename C, typename D, typename E, sl@0: typename F sl@0: > sl@0: inline typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F sl@0: >::type sl@0: function::operator()( sl@0: A const& a, B const& b, C const& c, D const& d, E const& e, sl@0: F const& f sl@0: ) const sl@0: { sl@0: typedef typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F sl@0: >::composite_type ret_t; sl@0: sl@0: return ret_t( sl@0: op, sl@0: as_actor::convert(a), sl@0: as_actor::convert(b), sl@0: as_actor::convert(c), sl@0: as_actor::convert(d), sl@0: as_actor::convert(e), sl@0: as_actor::convert(f) sl@0: ); sl@0: } sl@0: sl@0: #if PHOENIX_LIMIT > 6 sl@0: sl@0: ////////////////////////////////// sl@0: template sl@0: template < sl@0: typename A, typename B, typename C, typename D, typename E, sl@0: typename F, typename G sl@0: > sl@0: inline typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G sl@0: >::type sl@0: function::operator()( sl@0: A const& a, B const& b, C const& c, D const& d, E const& e, sl@0: F const& f, G const& g sl@0: ) const sl@0: { sl@0: typedef typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G sl@0: >::composite_type ret_t; sl@0: sl@0: return ret_t( sl@0: op, sl@0: as_actor::convert(a), sl@0: as_actor::convert(b), sl@0: as_actor::convert(c), sl@0: as_actor::convert(d), sl@0: as_actor::convert(e), sl@0: as_actor::convert(f), sl@0: as_actor::convert(g) sl@0: ); sl@0: } sl@0: sl@0: ////////////////////////////////// sl@0: template sl@0: template < sl@0: typename A, typename B, typename C, typename D, typename E, sl@0: typename F, typename G, typename H sl@0: > sl@0: inline typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G, H sl@0: >::type sl@0: function::operator()( sl@0: A const& a, B const& b, C const& c, D const& d, E const& e, sl@0: F const& f, G const& g, H const& h sl@0: ) const sl@0: { sl@0: typedef typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G, H sl@0: >::composite_type ret_t; sl@0: sl@0: return ret_t( sl@0: op, sl@0: as_actor::convert(a), sl@0: as_actor::convert(b), sl@0: as_actor::convert(c), sl@0: as_actor::convert(d), sl@0: as_actor::convert(e), sl@0: as_actor::convert(f), sl@0: as_actor::convert(g), sl@0: as_actor::convert(h) sl@0: ); sl@0: } sl@0: sl@0: ////////////////////////////////// sl@0: template sl@0: template < sl@0: typename A, typename B, typename C, typename D, typename E, sl@0: typename F, typename G, typename H, typename I sl@0: > sl@0: inline typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G, H, I sl@0: >::type sl@0: function::operator()( sl@0: A const& a, B const& b, C const& c, D const& d, E const& e, sl@0: F const& f, G const& g, H const& h, I const& i sl@0: ) const sl@0: { sl@0: typedef typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G, H, I sl@0: >::composite_type ret_t; sl@0: sl@0: return ret_t( sl@0: op, sl@0: as_actor::convert(a), sl@0: as_actor::convert(b), sl@0: as_actor::convert(c), sl@0: as_actor::convert(d), sl@0: as_actor::convert(e), sl@0: as_actor::convert(f), sl@0: as_actor::convert(g), sl@0: as_actor::convert(h), sl@0: as_actor::convert(i) sl@0: ); sl@0: } sl@0: sl@0: #if PHOENIX_LIMIT > 9 sl@0: sl@0: ////////////////////////////////// sl@0: template sl@0: template < sl@0: typename A, typename B, typename C, typename D, typename E, sl@0: typename F, typename G, typename H, typename I, typename J sl@0: > sl@0: inline typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G, H, I, J sl@0: >::type sl@0: function::operator()( sl@0: A const& a, B const& b, C const& c, D const& d, E const& e, sl@0: F const& f, G const& g, H const& h, I const& i, J const& j sl@0: ) const sl@0: { sl@0: typedef typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G, H, I, J sl@0: >::composite_type ret_t; sl@0: sl@0: return ret_t( sl@0: op, sl@0: as_actor::convert(a), sl@0: as_actor::convert(b), sl@0: as_actor::convert(c), sl@0: as_actor::convert(d), sl@0: as_actor::convert(e), sl@0: as_actor::convert(f), sl@0: as_actor::convert(g), sl@0: as_actor::convert(h), sl@0: as_actor::convert(i), sl@0: as_actor::convert(j) sl@0: ); sl@0: } sl@0: sl@0: ////////////////////////////////// sl@0: template sl@0: template < sl@0: typename A, typename B, typename C, typename D, typename E, sl@0: typename F, typename G, typename H, typename I, typename J, sl@0: typename K sl@0: > sl@0: inline typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G, H, I, J, K sl@0: >::type sl@0: function::operator()( sl@0: A const& a, B const& b, C const& c, D const& d, E const& e, sl@0: F const& f, G const& g, H const& h, I const& i, J const& j, sl@0: K const& k sl@0: ) const sl@0: { sl@0: typedef typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G, H, I, J, K sl@0: >::composite_type ret_t; sl@0: sl@0: return ret_t( sl@0: op, sl@0: as_actor::convert(a), sl@0: as_actor::convert(b), sl@0: as_actor::convert(c), sl@0: as_actor::convert(d), sl@0: as_actor::convert(e), sl@0: as_actor::convert(f), sl@0: as_actor::convert(g), sl@0: as_actor::convert(h), sl@0: as_actor::convert(i), sl@0: as_actor::convert(j), sl@0: as_actor::convert(k) sl@0: ); sl@0: } sl@0: sl@0: ////////////////////////////////// sl@0: template sl@0: template < sl@0: typename A, typename B, typename C, typename D, typename E, sl@0: typename F, typename G, typename H, typename I, typename J, sl@0: typename K, typename L sl@0: > sl@0: inline typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G, H, I, J, K, L sl@0: >::type sl@0: function::operator()( sl@0: A const& a, B const& b, C const& c, D const& d, E const& e, sl@0: F const& f, G const& g, H const& h, I const& i, J const& j, sl@0: K const& k, L const& l sl@0: ) const sl@0: { sl@0: typedef typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G, H, I, J, K, L sl@0: >::composite_type ret_t; sl@0: sl@0: return ret_t( sl@0: op, sl@0: as_actor::convert(a), sl@0: as_actor::convert(b), sl@0: as_actor::convert(c), sl@0: as_actor::convert(d), sl@0: as_actor::convert(e), sl@0: as_actor::convert(f), sl@0: as_actor::convert(g), sl@0: as_actor::convert(h), sl@0: as_actor::convert(i), sl@0: as_actor::convert(j), sl@0: as_actor::convert(k), sl@0: as_actor::convert(l) sl@0: ); sl@0: } sl@0: sl@0: #if PHOENIX_LIMIT > 12 sl@0: sl@0: ////////////////////////////////// sl@0: template sl@0: template < sl@0: typename A, typename B, typename C, typename D, typename E, sl@0: typename F, typename G, typename H, typename I, typename J, sl@0: typename K, typename L, typename M sl@0: > sl@0: inline typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G, H, I, J, K, L, M sl@0: >::type sl@0: function::operator()( sl@0: A const& a, B const& b, C const& c, D const& d, E const& e, sl@0: F const& f, G const& g, H const& h, I const& i, J const& j, sl@0: K const& k, L const& l, M const& m sl@0: ) const sl@0: { sl@0: typedef typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G, H, I, J, K, L, M sl@0: >::composite_type ret_t; sl@0: sl@0: return ret_t( sl@0: op, sl@0: as_actor::convert(a), sl@0: as_actor::convert(b), sl@0: as_actor::convert(c), sl@0: as_actor::convert(d), sl@0: as_actor::convert(e), sl@0: as_actor::convert(f), sl@0: as_actor::convert(g), sl@0: as_actor::convert(h), sl@0: as_actor::convert(i), sl@0: as_actor::convert(j), sl@0: as_actor::convert(k), sl@0: as_actor::convert(l), sl@0: as_actor::convert(m) sl@0: ); sl@0: } sl@0: sl@0: ////////////////////////////////// sl@0: template sl@0: template < sl@0: typename A, typename B, typename C, typename D, typename E, sl@0: typename F, typename G, typename H, typename I, typename J, sl@0: typename K, typename L, typename M, typename N sl@0: > sl@0: inline typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G, H, I, J, K, L, M, N sl@0: >::type sl@0: function::operator()( sl@0: A const& a, B const& b, C const& c, D const& d, E const& e, sl@0: F const& f, G const& g, H const& h, I const& i, J const& j, sl@0: K const& k, L const& l, M const& m, N const& n sl@0: ) const sl@0: { sl@0: typedef typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G, H, I, J, K, L, M, N sl@0: >::composite_type ret_t; sl@0: sl@0: return ret_t( sl@0: op, sl@0: as_actor::convert(a), sl@0: as_actor::convert(b), sl@0: as_actor::convert(c), sl@0: as_actor::convert(d), sl@0: as_actor::convert(e), sl@0: as_actor::convert(f), sl@0: as_actor::convert(g), sl@0: as_actor::convert(h), sl@0: as_actor::convert(i), sl@0: as_actor::convert(j), sl@0: as_actor::convert(k), sl@0: as_actor::convert(l), sl@0: as_actor::convert(m), sl@0: as_actor::convert(n) sl@0: ); sl@0: } sl@0: sl@0: ////////////////////////////////// sl@0: template sl@0: template < sl@0: typename A, typename B, typename C, typename D, typename E, sl@0: typename F, typename G, typename H, typename I, typename J, sl@0: typename K, typename L, typename M, typename N, typename O sl@0: > sl@0: inline typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O sl@0: >::type sl@0: function::operator()( sl@0: A const& a, B const& b, C const& c, D const& d, E const& e, sl@0: F const& f, G const& g, H const& h, I const& i, J const& j, sl@0: K const& k, L const& l, M const& m, N const& n, O const& o sl@0: ) const sl@0: { sl@0: typedef typename impl::make_composite< sl@0: OperationT, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O sl@0: >::composite_type ret_t; sl@0: sl@0: return ret_t( sl@0: op, sl@0: as_actor::convert(a), sl@0: as_actor::convert(b), sl@0: as_actor::convert(c), sl@0: as_actor::convert(d), sl@0: as_actor::convert(e), sl@0: as_actor::convert(f), sl@0: as_actor::convert(g), sl@0: as_actor::convert(h), sl@0: as_actor::convert(i), sl@0: as_actor::convert(j), sl@0: as_actor::convert(k), sl@0: as_actor::convert(l), sl@0: as_actor::convert(m), sl@0: as_actor::convert(n), sl@0: as_actor::convert(o) sl@0: ); sl@0: } sl@0: sl@0: #endif sl@0: #endif sl@0: #endif sl@0: #endif sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: } // namespace phoenix sl@0: sl@0: #endif