/*============================================================================= Copyright (c) 2001-2007 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #ifndef PHOENIX_BIND_BIND_FUNCTION_HPP #define PHOENIX_BIND_BIND_FUNCTION_HPP #include #include #include namespace boost { namespace phoenix { template inline actor< typename as_composite< detail::function_eval<0> , detail::function_ptr<0, RT, RT(*)()> >::type> bind(RT(*f)()) { typedef detail::function_ptr<0, RT, RT(*)()> fp_type; return compose >(fp_type(f)); } template inline actor< typename as_composite< detail::function_eval<1> , detail::function_ptr<1, RT, RT(*)(T0)> , A0 >::type> bind(RT(*f)(T0), A0 const& _0) { typedef detail::function_ptr<1, RT, RT(*)(T0)> fp_type; return compose >(fp_type(f), _0); } template inline actor< typename as_composite< detail::function_eval<2> , detail::function_ptr<2, RT, RT(*)(T0, T1)> , A0, A1 >::type> bind(RT(*f)(T0, T1), A0 const& _0, A1 const& _1) { typedef detail::function_ptr<2, RT, RT(*)(T0, T1)> fp_type; return compose >(fp_type(f), _0, _1); } // Bring in the rest of the function binders #include }} #endif