Chris@16: /*============================================================================= Chris@16: Copyright (c) 2001-2007 Joel de Guzman Chris@101: Copyright (c) 2014 John Fletcher Chris@16: Chris@101: Distributed under the Boost Software License, Version 1.0. (See accompanying Chris@16: file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: ==============================================================================*/ Chris@16: Chris@16: #ifndef PHOENIX_BIND_BIND_MEMBER_VARIABLE_HPP Chris@16: #define PHOENIX_BIND_BIND_MEMBER_VARIABLE_HPP Chris@16: Chris@101: #include Chris@101: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: Chris@16: namespace boost { namespace phoenix Chris@16: { Chris@16: template Chris@101: inline Chris@101: typename boost::lazy_disable_if< Chris@101: boost::is_member_function_pointer, Chris@101: typename detail::expression::function_eval< Chris@16: detail::member_variable Chris@101: , ClassA >//::type Chris@101: >::type const Chris@16: bind(RT ClassT::*mp, ClassA const& obj) Chris@16: { Chris@16: typedef detail::member_variable mp_type; Chris@16: return Chris@16: detail::expression::function_eval Chris@16: ::make(mp_type(mp), obj); Chris@16: } Chris@16: Chris@16: template Chris@101: inline Chris@101: typename boost::lazy_disable_if< Chris@101: boost::is_member_function_pointer, Chris@101: typename detail::expression::function_eval< Chris@16: detail::member_variable Chris@101: , ClassT >//::type Chris@16: >::type const Chris@16: bind(RT ClassT::*mp, ClassT& obj) Chris@16: { Chris@16: typedef detail::member_variable mp_type; Chris@16: return Chris@16: detail::expression::function_eval< Chris@16: mp_type Chris@16: , ClassT Chris@16: >::make(mp_type(mp), obj); Chris@16: } Chris@16: Chris@16: }} Chris@16: Chris@16: #endif