1 /*==============================================================================
2 Copyright (c) 2005-2010 Joel de Guzman
3 Copyright (c) 2010 Thomas Heller
4 Copyright (c) 2016 Kohei Takahashi
6 Distributed under the Boost Software License, Version 1.0. (See accompanying
7 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 ==============================================================================*/
10 #ifndef BOOST_PHOENIX_OPERATOR_MEMBER_HPP
11 #define BOOST_PHOENIX_OPERATOR_MEMBER_HPP
13 #include <boost/phoenix/core/limits.hpp>
14 #include <boost/get_pointer.hpp>
15 #include <boost/phoenix/core/domain.hpp>
16 #include <boost/phoenix/core/meta_grammar.hpp>
17 #include <boost/phoenix/core/call.hpp>
18 #include <boost/phoenix/core/expression.hpp>
19 #include <boost/type_traits/remove_reference.hpp>
20 #include <boost/type_traits/is_member_function_pointer.hpp>
21 #include <boost/proto/operators.hpp>
22 #include <boost/phoenix/support/iterate.hpp>
24 #ifdef BOOST_PHOENIX_NO_VARIADIC_EXPRESSION
25 # include <boost/phoenix/operator/detail/cpp03/mem_fun_ptr_expr.hpp>
27 BOOST_PHOENIX_DEFINE_EXPRESSION_VARARG(
28 (boost)(phoenix)(mem_fun_ptr)
29 , (meta_grammar)(meta_grammar)
34 #include <boost/phoenix/operator/detail/define_operator.hpp>
36 namespace boost { namespace phoenix
38 #if defined(BOOST_PHOENIX_NO_VARIADIC_OPERATOR)
39 #include <boost/phoenix/operator/detail/cpp03/mem_fun_ptr_gen.hpp>
44 BOOST_PHOENIX_BINARY_OPERATORS((mem_ptr))
47 struct phoenix_generator::case_<proto::tag::mem_ptr>
51 proto::mem_ptr<meta_grammar, proto::terminal<proto::_> >
52 , proto::if_<is_member_function_pointer<boost::remove_reference<proto::call<proto::_value(proto::_right)> > >()>
54 , proto::call<detail::make_mem_fun_ptr_gen(proto::_left, proto::call<proto::_value(proto::_right)>)>
57 proto::call<proto::pod_generator<actor>(proto::_)>
66 , BOOST_PHOENIX_typename_A_void(BOOST_PHOENIX_LIMIT)
67 , typename Dummy = void
69 struct mem_fun_ptr_eval;
71 #if defined(BOOST_PHOENIX_NO_VARIADIC_OPERATOR)
72 #include <boost/phoenix/operator/detail/cpp03/mem_fun_ptr_eval_result_of.hpp>
78 struct mem_fun_ptr_eval
80 template<typename Sig>
83 #if defined(BOOST_PHOENIX_NO_VARIADIC_OPERATOR)
84 #include <boost/phoenix/operator/detail/cpp03/mem_fun_ptr_eval.hpp>
90 template <typename Dummy>
91 struct default_actions::when<rule::mem_fun_ptr, Dummy>
92 : call<mem_fun_ptr_eval>
96 #include <boost/phoenix/operator/detail/undef_operator.hpp>