annotate DEPENDENCIES/generic/include/boost/phoenix/bind/bind_member_variable.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents c530137014c0
children
rev   line source
Chris@16 1 /*=============================================================================
Chris@16 2 Copyright (c) 2001-2007 Joel de Guzman
Chris@101 3 Copyright (c) 2014 John Fletcher
Chris@16 4
Chris@101 5 Distributed under the Boost Software License, Version 1.0. (See accompanying
Chris@16 6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 7 ==============================================================================*/
Chris@16 8
Chris@16 9 #ifndef PHOENIX_BIND_BIND_MEMBER_VARIABLE_HPP
Chris@16 10 #define PHOENIX_BIND_BIND_MEMBER_VARIABLE_HPP
Chris@16 11
Chris@101 12 #include <boost/utility/enable_if.hpp>
Chris@101 13 #include <boost/type_traits/is_member_function_pointer.hpp>
Chris@16 14 #include <boost/phoenix/core/expression.hpp>
Chris@16 15 #include <boost/phoenix/core/detail/function_eval.hpp>
Chris@16 16 #include <boost/phoenix/bind/detail/member_variable.hpp>
Chris@16 17
Chris@16 18 namespace boost { namespace phoenix
Chris@16 19 {
Chris@16 20 template <typename RT, typename ClassT, typename ClassA>
Chris@101 21 inline
Chris@101 22 typename boost::lazy_disable_if<
Chris@101 23 boost::is_member_function_pointer<RT (ClassT::*)>,
Chris@101 24 typename detail::expression::function_eval<
Chris@16 25 detail::member_variable<RT, RT ClassT::*>
Chris@101 26 , ClassA >//::type
Chris@101 27 >::type const
Chris@16 28 bind(RT ClassT::*mp, ClassA const& obj)
Chris@16 29 {
Chris@16 30 typedef detail::member_variable<RT, RT ClassT::*> mp_type;
Chris@16 31 return
Chris@16 32 detail::expression::function_eval<mp_type, ClassA>
Chris@16 33 ::make(mp_type(mp), obj);
Chris@16 34 }
Chris@16 35
Chris@16 36 template <typename RT, typename ClassT>
Chris@101 37 inline
Chris@101 38 typename boost::lazy_disable_if<
Chris@101 39 boost::is_member_function_pointer<RT (ClassT::*)>,
Chris@101 40 typename detail::expression::function_eval<
Chris@16 41 detail::member_variable<RT, RT ClassT::*>
Chris@101 42 , ClassT >//::type
Chris@16 43 >::type const
Chris@16 44 bind(RT ClassT::*mp, ClassT& obj)
Chris@16 45 {
Chris@16 46 typedef detail::member_variable<RT, RT ClassT::*> mp_type;
Chris@16 47 return
Chris@16 48 detail::expression::function_eval<
Chris@16 49 mp_type
Chris@16 50 , ClassT
Chris@16 51 >::make(mp_type(mp), obj);
Chris@16 52 }
Chris@16 53
Chris@16 54 }}
Chris@16 55
Chris@16 56 #endif