PageRenderTime 21ms CodeModel.GetById 8ms app.highlight 9ms RepoModel.GetById 1ms app.codeStats 1ms

/Src/Dependencies/Boost/boost/spirit/home/phoenix/bind/bind_function_object.hpp

http://hadesmem.googlecode.com/
C++ Header | 40 lines | 27 code | 6 blank | 7 comment | 0 complexity | 14471e51f12a4e8e85ea7c3a5f75371d MD5 | raw file
 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
13namespace boost { namespace phoenix
14{
15    template <typename F>
16    inline actor<typename as_composite<detail::function_eval<0>, F>::type>
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>
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>
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