1 /*=============================================================================
2 Copyright (c) 2001-2007 Joel de Guzman
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 ==============================================================================*/
8 #ifndef PHOENIX_BIND_BIND_MEMBER_VARIABLE_HPP
9 #define PHOENIX_BIND_BIND_MEMBER_VARIABLE_HPP
11 #include <boost/phoenix/core/expression.hpp>
12 #include <boost/phoenix/core/detail/function_eval.hpp>
13 #include <boost/phoenix/bind/detail/member_variable.hpp>
15 namespace boost { namespace phoenix
17 template <typename RT, typename ClassT, typename ClassA>
20 detail::expression::function_eval<
21 detail::member_variable<RT, RT ClassT::*>
24 bind(RT ClassT::*mp, ClassA const& obj)
26 typedef detail::member_variable<RT, RT ClassT::*> mp_type;
28 detail::expression::function_eval<mp_type, ClassA>
29 ::make(mp_type(mp), obj);
32 template <typename RT, typename ClassT>
35 detail::expression::function_eval<
36 detail::member_variable<RT, RT ClassT::*>
39 bind(RT ClassT::*mp, ClassT& obj)
41 typedef detail::member_variable<RT, RT ClassT::*> mp_type;
43 detail::expression::function_eval<
46 >::make(mp_type(mp), obj);