Chris@16
|
1 /*=============================================================================
|
Chris@16
|
2 Copyright (c) 2001-2007 Joel de Guzman
|
Chris@16
|
3
|
Chris@16
|
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
|
Chris@16
|
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
6 ==============================================================================*/
|
Chris@16
|
7
|
Chris@16
|
8 #if !BOOST_PHOENIX_IS_ITERATING
|
Chris@16
|
9
|
Chris@16
|
10 #ifndef PHOENIX_BIND_BIND_FUNCTION_OBJECT_HPP
|
Chris@16
|
11 #define PHOENIX_BIND_BIND_FUNCTION_OBJECT_HPP
|
Chris@16
|
12
|
Chris@16
|
13 #include <boost/phoenix/core/expression.hpp>
|
Chris@16
|
14 #include <boost/phoenix/core/detail/function_eval.hpp>
|
Chris@16
|
15
|
Chris@16
|
16 namespace boost { namespace phoenix {
|
Chris@16
|
17 template <typename F>
|
Chris@16
|
18 inline
|
Chris@16
|
19 typename detail::expression::function_eval<F>::type const
|
Chris@16
|
20 bind(F f)
|
Chris@16
|
21 {
|
Chris@16
|
22 return detail::expression::function_eval<F>::make(f);
|
Chris@16
|
23 }
|
Chris@16
|
24
|
Chris@16
|
25 #if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
|
Chris@16
|
26 #include <boost/phoenix/bind/preprocessed/bind_function_object.hpp>
|
Chris@16
|
27 #else
|
Chris@16
|
28
|
Chris@16
|
29 #if defined(__WAVE__) && defined (BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
|
Chris@16
|
30 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/bind_function_object_" BOOST_PHOENIX_LIMIT_STR ".hpp")
|
Chris@16
|
31 #endif
|
Chris@16
|
32
|
Chris@16
|
33 /*=============================================================================
|
Chris@16
|
34 Copyright (c) 2001-2007 Joel de Guzman
|
Chris@16
|
35
|
Chris@16
|
36 Distributed under the Boost Software License, Version 1.0. (See accompanying
|
Chris@16
|
37 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
38 ==============================================================================*/
|
Chris@16
|
39
|
Chris@16
|
40 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
|
Chris@16
|
41 #pragma wave option(preserve: 1)
|
Chris@16
|
42 #endif
|
Chris@16
|
43
|
Chris@16
|
44 #define BOOST_PHOENIX_ITERATION_PARAMS \
|
Chris@16
|
45 (3, (1, BOOST_PP_DEC(BOOST_PHOENIX_ACTOR_LIMIT), \
|
Chris@16
|
46 <boost/phoenix/bind/bind_function_object.hpp>))
|
Chris@16
|
47 #include BOOST_PHOENIX_ITERATE()
|
Chris@16
|
48
|
Chris@16
|
49 #if defined(__WAVE__) && defined (BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
|
Chris@16
|
50 #pragma wave option(output: null)
|
Chris@16
|
51 #endif
|
Chris@16
|
52
|
Chris@16
|
53 #endif
|
Chris@16
|
54
|
Chris@16
|
55 }}
|
Chris@16
|
56
|
Chris@16
|
57 #endif
|
Chris@16
|
58
|
Chris@16
|
59 #else
|
Chris@16
|
60
|
Chris@16
|
61 template <
|
Chris@16
|
62 typename F
|
Chris@16
|
63 , BOOST_PHOENIX_typename_A
|
Chris@16
|
64 >
|
Chris@16
|
65 inline
|
Chris@16
|
66 typename detail::expression::function_eval<
|
Chris@16
|
67 F
|
Chris@16
|
68 , BOOST_PHOENIX_A
|
Chris@16
|
69 >::type const
|
Chris@16
|
70 bind(F f, BOOST_PHOENIX_A_const_ref_a)
|
Chris@16
|
71 {
|
Chris@16
|
72 return
|
Chris@16
|
73 detail::expression::function_eval<F, BOOST_PHOENIX_A>::make(
|
Chris@16
|
74 f
|
Chris@16
|
75 , BOOST_PHOENIX_a
|
Chris@16
|
76 );
|
Chris@16
|
77 }
|
Chris@16
|
78
|
Chris@16
|
79 #endif
|