Chris@16: /*============================================================================= Chris@16: Copyright (c) 2001-2007 Joel de Guzman Chris@16: Chris@16: Distributed under the Boost Software License, Version 1.0. (See accompanying Chris@16: file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: ==============================================================================*/ Chris@16: #ifndef PHOENIX_FUNCTION_FUNCTION_HPP Chris@16: #define PHOENIX_FUNCTION_FUNCTION_HPP Chris@16: Chris@16: #include Chris@16: #include Chris@16: Chris@16: namespace boost { namespace phoenix Chris@16: { Chris@16: template Chris@16: struct function Chris@16: { Chris@16: function() : f() {} Chris@16: function(F const& f_) : f(f_) {} Chris@16: Chris@16: actor, F>::type> Chris@16: operator()() const Chris@16: { Chris@16: return compose >(f); Chris@16: } Chris@16: Chris@16: template Chris@16: actor, F, A0>::type> Chris@16: operator()(A0 const& _0) const Chris@16: { Chris@16: return compose >(f, _0); Chris@16: } Chris@16: Chris@16: template Chris@16: actor, F, A0, A1>::type> Chris@16: operator()(A0 const& _0, A1 const& _1) const Chris@16: { Chris@16: return compose >(f, _0, _1); Chris@16: } Chris@16: Chris@16: // Bring in the rest of the function call operators Chris@16: #include Chris@16: Chris@16: F f; Chris@16: }; Chris@16: }} Chris@16: Chris@16: #endif