x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
construct.hpp - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\boost_1_35_0\boost\xpressive\proto\transform\construct.hpp
旋转
特效
属性
历史版本
#ifndef BOOST_PP_IS_ITERATING /////////////////////////////////////////////////////////////////////////////// /// \file construct.hpp /// For constructing an arbitrary type from a bunch of transforms. // // Copyright 2007 Eric Niebler. 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_PROTO_TRANSFORM_CONSTRUCT_HPP_EAN_12_26_2006 #define BOOST_PROTO_TRANSFORM_CONSTRUCT_HPP_EAN_12_26_2006 #include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
namespace boost { namespace proto { namespace transform { namespace detail { template
struct is_aggregate : is_pod
{}; template
struct is_aggregate
> : mpl::true_ {}; template
::value> struct nested_type { typedef typename T::type type; }; template
struct nested_type
{ typedef T type; }; template
struct nested_type_if : nested_type
{ typedef yes_type proto_transform_applied; }; template
struct nested_type_if
{ typedef T type; typedef no_type proto_transform_applied; }; template
::type>::value> struct as_transform { typedef Arg type; }; template
struct as_transform
{ typedef construct<_, typename remove_pointer
::type> type; }; template
::type>::value> struct as_pod_transform { typedef Arg type; }; template
struct as_pod_transform
{ typedef pod_construct<_, typename remove_pointer
::type> type; }; template
::value) > struct apply_aux_ { typedef R type; typedef no_type proto_transform_applied; }; template
::value> struct apply_ : apply_aux_
{}; template
struct apply_
: nested_type
::type> { typedef yes_type proto_transform_applied; }; // work around GCC bug template
struct apply_
, Expr, State, Visitor, false> { typedef expr
type; typedef no_type proto_transform_applied; }; template
void ignore_unused(T const &) {} } template
struct construct : Grammar { template
struct apply : ConstructorFun::template apply
::type, State, Visitor> {}; template
static typename apply
::type call(Expr const &expr, State const &state, Visitor &visitor) { return ConstructorFun::call(Grammar::call(expr, state, visitor), state, visitor); } }; #define BOOST_PROTO_APPLY_(Z, N, DATA) \ typename apply_
::type \ /**/ #define BOOST_PROTO_IS_APPLIED_(Z, N, DATA) \ typename apply_
::proto_transform_applied \ /**/ #define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PROTO_MAX_ARITY,
)) #include BOOST_PP_ITERATE() #undef BOOST_PROTO_APPLY_ #undef BOOST_PROTO_IS_APPLIED_ }}} namespace boost { namespace proto { template
struct is_transform
> : mpl::true_ {}; template
struct is_transform
> : mpl::true_ {}; }} #endif #else #define N BOOST_PP_ITERATION() #if N > 0 namespace detail { template< template
class T BOOST_PP_ENUM_TRAILING_PARAMS(N, typename G), typename Expr, typename State, typename Visitor > struct apply_aux_
, Expr, State, Visitor BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(N)> : nested_type_if< T
BOOST_PP_ENUM_TRAILING(N, BOOST_PROTO_IS_APPLIED_, G) > {}; } #endif template
struct construct
: Grammar { template
struct apply : detail::apply_
::type, State, Visitor> {}; template
static typename apply
::type call(Expr const &expr, State const &state, Visitor &visitor) { typedef typename apply
::type result_type; return construct::call_(expr, state, visitor, detail::is_aggregate
()); } private: /// INTERNAL ONLY /// template
static typename apply
::type call_(Expr const &expr, State const &state, Visitor &visitor, mpl::true_) { typename Grammar::template apply
::type const &expr2 = Grammar::call(expr, state, visitor); detail::ignore_unused(expr2); typename apply
::type that = { BOOST_PP_ENUM_BINARY_PARAMS(N, detail::as_transform
::type::call(expr2, state, visitor) BOOST_PP_INTERCEPT) }; return that; } /// INTERNAL ONLY /// template
static typename apply
::type call_(Expr const &expr, State const &state, Visitor &visitor, mpl::false_) { typename Grammar::template apply
::type const &expr2 = Grammar::call(expr, state, visitor); detail::ignore_unused(expr2); return typename apply
::type( BOOST_PP_ENUM_BINARY_PARAMS(N, detail::as_transform
::type::call(expr2, state, visitor) BOOST_PP_INTERCEPT) ); } }; template
struct pod_construct
: Grammar { template
struct apply : detail::apply_
::type, State, Visitor> {}; template
static typename apply
::type call(Expr const &expr, State const &state, Visitor &visitor) { typename Grammar::template apply
::type const &expr2 = Grammar::call(expr, state, visitor); detail::ignore_unused(expr2); typename apply
::type that = { BOOST_PP_ENUM_BINARY_PARAMS(N, detail::as_pod_transform
::type::call(expr2, state, visitor) BOOST_PP_INTERCEPT) }; return that; } }; #undef N #endif
construct.hpp
网页地址
文件地址
上一页
5/10
下一页
下载
( 10 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.