⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mem_fun_ptr_gen.hpp

📁 Boost provides free peer-reviewed portable C++ source libraries. We emphasize libraries that work
💻 HPP
字号:
/*=============================================================================    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 <boost/spirit/home/phoenix/core/composite.hpp>#include <boost/spirit/home/phoenix/core/compose.hpp>#include <boost/spirit/home/phoenix/core/as_actor.hpp>#include <boost/spirit/home/phoenix/core/limits.hpp>#include <boost/spirit/home/phoenix/core/actor.hpp>#include <boost/preprocessor/repetition/enum_params.hpp>#include <boost/preprocessor/repetition/enum_binary_params.hpp>#include <boost/preprocessor/iteration/iterate.hpp>#include <boost/preprocessor/arithmetic/sub.hpp>#include <boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_eval.hpp>namespace boost { namespace phoenix {    template<typename Actor, typename MemFunPtr>    struct mem_fun_ptr_gen    {        mem_fun_ptr_gen(            const Actor& actor, MemFunPtr memFunPtr)            : mActor(actor), mMemFunPtr(memFunPtr) { }        actor<typename as_composite<mem_fun_ptr_eval, Actor, typename as_actor<MemFunPtr>::type>::type>        operator()() const        {            return compose<mem_fun_ptr_eval>(                mActor, as_actor<MemFunPtr>::convert(mMemFunPtr));        }#define BOOST_PP_ITERATION_PARAMS_1                                                        \        (3, (1, BOOST_PP_SUB(PHOENIX_MEMBER_LIMIT, 2), "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<BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, typename Arg)>        actor<typename as_composite<            mem_fun_ptr_eval, Actor, typename as_actor<MemFunPtr>::type,            BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, Arg)>::type>        operator()(            BOOST_PP_ENUM_BINARY_PARAMS(PHOENIX_ITERATION, const Arg, &arg)) const        {            return compose<mem_fun_ptr_eval>(                mActor, as_actor<MemFunPtr>::convert(mMemFunPtr),                BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, arg));        }#undef PHOENIX_ITERATION#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -