1 /*=============================================================================
2     Copyright (c) 2001-2007 Joel de Guzman
3 
4     Distributed under the Boost Software License, Version 1.0. (See accompanying
5     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 ==============================================================================*/
7 #ifndef PHOENIX_BIND_BIND_FUNCTION_OBJECT_HPP
8 #define PHOENIX_BIND_BIND_FUNCTION_OBJECT_HPP
9 
10 #include <boost/spirit/home/phoenix/core/compose.hpp>
11 #include <boost/spirit/home/phoenix/core/detail/function_eval.hpp>
12 
13 namespace boost { namespace phoenix
14 {
15     template <typename F>
16     inline actor<typename as_composite<detail::function_eval<0>, F>::type>
bind(F const & f)17     bind(F const& f)
18     {
19         return compose<detail::function_eval<0> >(f);
20     }
21 
22     template <typename F, typename A0>
23     inline actor<typename as_composite<detail::function_eval<1>, F, A0>::type>
bind(F const & f,A0 const & _0)24     bind(F const& f, A0 const& _0)
25     {
26         return compose<detail::function_eval<1> >(f, _0);
27     }
28 
29     template <typename F, typename A0, typename A1>
30     inline actor<typename as_composite<detail::function_eval<2>, F, A0, A1>::type>
bind(F const & f,A0 const & _0,A1 const & _1)31     bind(F const& f, A0 const& _0, A1 const& _1)
32     {
33         return compose<detail::function_eval<2> >(f, _0, _1);
34     }
35 
36     //  Bring in the rest of the function object binders
37     #include <boost/spirit/home/phoenix/bind/detail/bind_function_object.hpp>
38 }}
39 
40 #endif
41