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