/*============================================================================= Copyright (c) 2005-2007 Dan Marsden Copyright (c) 2005-2007 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #ifndef BOOST_PP_IS_ITERATING #ifndef PHOENIX_OPERATOR_DETAIL_MEM_FUN_PTR_GEN_HPP #define PHOENIX_OPERATOR_DETAIL_MEM_FUN_PTR_GEN_HPP #include #include #include #include #include #include #include #include #include #include namespace boost { namespace phoenix { template struct mem_fun_ptr_gen { mem_fun_ptr_gen( const Actor& actor, MemFunPtr memFunPtr) : mActor(actor), mMemFunPtr(memFunPtr) { } actor::type>::type> operator()() const { return compose( mActor, as_actor::convert(mMemFunPtr)); } #define BOOST_PP_ITERATION_PARAMS_1 \ (3, (1, BOOST_PP_DEC(BOOST_PP_DEC(PHOENIX_MEMBER_LIMIT)), "boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_gen.hpp")) #include BOOST_PP_ITERATE() Actor mActor; MemFunPtr mMemFunPtr; }; }} #endif #else #define PHOENIX_ITERATION BOOST_PP_ITERATION() template actor::type, BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, Arg)>::type> operator()( BOOST_PP_ENUM_BINARY_PARAMS(PHOENIX_ITERATION, const Arg, &arg)) const { return compose( mActor, as_actor::convert(mMemFunPtr), BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, arg)); } #undef PHOENIX_ITERATION #endif