| 1 | /*============================================================================= |
| 2 | Copyright (c) 2016 Kohei Takahashi |
| 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 | |
| 8 | #ifndef PHOENIX_BIND_BIND_FUNCTION_OBJECT_HPP |
| 9 | #define PHOENIX_BIND_BIND_FUNCTION_OBJECT_HPP |
| 10 | |
| 11 | #include <boost/phoenix/core/limits.hpp> |
| 12 | |
| 13 | #if defined(BOOST_PHOENIX_NO_VARIADIC_BIND) |
| 14 | # include <boost/phoenix/bind/detail/cpp03/bind_function_object.hpp> |
| 15 | #else |
| 16 | |
| 17 | #include <boost/phoenix/core/expression.hpp> |
| 18 | #include <boost/phoenix/core/detail/function_eval.hpp> |
| 19 | |
| 20 | namespace boost { namespace phoenix |
| 21 | { |
| 22 | template <typename F> |
| 23 | inline typename detail::expression::function_eval<F>::type const |
| 24 | bind(F f) |
| 25 | { |
| 26 | return detail::expression::function_eval<F>::make(f); |
| 27 | } |
| 28 | |
| 29 | template <typename F, typename... A> |
| 30 | inline typename detail::expression::function_eval<F, A...>::type const |
| 31 | bind(F f, A const&... a) |
| 32 | { |
| 33 | return detail::expression::function_eval<F, A...>::make(f, a...); |
| 34 | } |
| 35 | }} // namespace boost::phoenix |
| 36 | |
| 37 | #endif |
| 38 | #endif |
| 39 | |