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>
19 detail::expression::function_eval<
20 detail::member_variable<RT, RT ClassT::*>
23 bind(RT ClassT::*mp, ClassA const& obj)
25 typedef detail::member_variable<RT, RT ClassT::*> mp_type;
27 detail::expression::function_eval<mp_type, ClassA>
28 ::make(mp_type(mp), obj);
31 template <typename RT, typename ClassT>
33 detail::expression::function_eval<
34 detail::member_variable<RT, RT ClassT::*>
37 bind(RT ClassT::*mp, ClassT& obj)
39 typedef detail::member_variable<RT, RT ClassT::*> mp_type;
41 detail::expression::function_eval<
44 >::make(mp_type(mp), obj);