x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
invoke_function_object.hpp - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\boost_1_35_0\boost\fusion\functional\invocation\invoke_function_object.hpp
旋转
特效
属性
历史版本
/*============================================================================= Copyright (c) 2005-2006 João Abecasis Copyright (c) 2006-2007 Tobias Schwinger Use modification and distribution are subject to 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). ==============================================================================*/ #if !defined(BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_FUNCTION_OBJECT_HPP_INCLUDED) #if !defined(BOOST_PP_IS_ITERATING) #include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
namespace boost { namespace fusion { namespace result_of { template
struct invoke_function_object; } template
inline typename result_of::invoke_function_object
::type invoke_function_object(Function, Sequence &); template
inline typename result_of::invoke_function_object
::type invoke_function_object(Function, Sequence const &); //----- ---- --- -- - - - - namespace detail { template< class Function, class Sequence, int N = result_of::size
::value, bool RandomAccess = traits::is_random_access
::value > struct invoke_function_object_impl; template
struct invoke_function_object_param_types; #define BOOST_PP_FILENAME_1 \
#define BOOST_PP_ITERATION_LIMITS \ (0, BOOST_FUSION_INVOKE_FUNCTION_OBJECT_MAX_ARITY) #include BOOST_PP_ITERATE() } namespace result_of { template
struct invoke_function_object { typedef typename detail::invoke_function_object_impl< typename boost::remove_reference
::type, Sequence >::result_type type; }; } template
inline typename result_of::invoke_function_object
::type invoke_function_object(Function f, Sequence & s) { return detail::invoke_function_object_impl< typename boost::remove_reference
::type,Sequence >::call(f,s); } template
inline typename result_of::invoke_function_object
::type invoke_function_object(Function f, Sequence const & s) { return detail::invoke_function_object_impl< typename boost::remove_reference
::type,Sequence const >::call(f,s); } }} #define BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_FUNCTION_OBJECT_HPP_INCLUDED #else // defined(BOOST_PP_IS_ITERATING) /////////////////////////////////////////////////////////////////////////////// // // Preprocessor vertical repetition code // /////////////////////////////////////////////////////////////////////////////// #define N BOOST_PP_ITERATION() template
struct invoke_function_object_impl
{ public: typedef typename boost::result_of< #define M(z,j,data) \ typename result_of::at_c
::type Function (BOOST_PP_ENUM(N,M,~)) >::type result_type; #undef M template
static inline result_type call(F & f, Sequence & s) { #define M(z,j,data) fusion::at_c
(s) return f( BOOST_PP_ENUM(N,M,~) ); #undef M } }; template
struct invoke_function_object_impl
{ private: typedef invoke_function_object_param_types
seq; public: typedef typename boost::result_of< Function (BOOST_PP_ENUM_PARAMS(N,typename seq::T)) >::type result_type; template
static inline result_type call(F & f, Sequence & s) { #if N > 0 typename seq::I0 i0 = fusion::begin(s); #define M(z,j,data) \ typename seq::I##j i##j = \ fusion::next(BOOST_PP_CAT(i,BOOST_PP_DEC(j))); BOOST_PP_REPEAT_FROM_TO(1,N,M,~) #undef M #endif return f( BOOST_PP_ENUM_PARAMS(N,*i) ); } }; template
struct invoke_function_object_param_types
{ #if N > 0 typedef typename result_of::begin
::type I0; typedef typename result_of::deref
::type T0; #define M(z,i,data) \ typedef typename result_of::next< \ BOOST_PP_CAT(I,BOOST_PP_DEC(i))>::type I##i; \ typedef typename result_of::deref
::type T##i; BOOST_PP_REPEAT_FROM_TO(1,N,M,~) #undef M #endif }; #undef N #endif // defined(BOOST_PP_IS_ITERATING) #endif
invoke_function_object.hpp
网页地址
文件地址
上一页
2/4
下一页
下载
( 6 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.