x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
cons.hpp - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\boost_1_35_0\boost\xpressive\detail\utility\cons.hpp
旋转
特效
属性
历史版本
/////////////////////////////////////////////////////////////////////////////// // cons.hpp // // 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_XPRESSIVE_DETAIL_UTILITY_CONS_HPP_EAN_11_19_2005 #define BOOST_XPRESSIVE_DETAIL_UTILITY_CONS_HPP_EAN_11_19_2005 #include
#if BOOST_VERSION >= 103300 // In Boost 1.33+, we have a cons list in Fusion, so just include it. # if BOOST_VERSION >= 103500 # include
// Boost 1.35+ has Fusion2 # else # include
// Fusion1 # endif #else // For earlier versions of Boost, put the definition of cons here # include
# include
# include
# include
# include
# include
# include
# include
# include
# include
# include
# include
# include
# include
# include
# include
# include
namespace boost { namespace fusion { struct nil; struct cons_tag; template
struct cons; struct cons_iterator_tag; template
struct cons_iterator; namespace cons_detail { template
struct deref_traits_impl { typedef typename Iterator::cons_type cons_type; typedef typename cons_type::car_type value_type; typedef typename mpl::eval_if< is_const
, add_reference
::type> , add_reference
>::type type; static type call(Iterator const& i) { return detail::ref(i.cons.car); } }; template
struct next_traits_impl { typedef typename Iterator::cons_type cons_type; typedef typename cons_type::cdr_type cdr_type; typedef cons_iterator< typename mpl::eval_if< is_const
, add_const
, mpl::identity
>::type> type; static type call(Iterator const& i) { return type(detail::ref(i.cons.cdr)); } }; template
struct value_traits_impl { typedef typename Iterator::cons_type cons_type; typedef typename cons_type::car_type type; }; template
struct begin_traits_impl { typedef cons_iterator
type; static type call(Cons& t) { return type(t); } }; template
struct end_traits_impl { typedef cons_iterator< typename mpl::if_
, nil const, nil>::type> type; static type call(Cons& t) { FUSION_RETURN_DEFAULT_CONSTRUCTED; } }; } // namespace cons_detail namespace meta { template
struct deref_impl; template <> struct deref_impl
{ template
struct apply : cons_detail::deref_traits_impl
{}; }; template
struct next_impl; template <> struct next_impl
{ template
struct apply : cons_detail::next_traits_impl
{}; }; template
struct value_impl; template <> struct value_impl
{ template
struct apply : cons_detail::value_traits_impl
{}; }; template
struct begin_impl; template <> struct begin_impl
{ template
struct apply : cons_detail::begin_traits_impl
{}; }; template
struct end_impl; template <> struct end_impl
{ template
struct apply : cons_detail::end_traits_impl
{}; }; } // namespace meta template
struct cons_iterator : iterator_base
> { typedef cons_iterator_tag tag; typedef Cons cons_type; explicit cons_iterator(cons_type& cons_) : cons(cons_) {} cons_type& cons; }; template <> struct cons_iterator
: iterator_base
> { typedef cons_iterator_tag tag; typedef nil cons_type; cons_iterator() {} explicit cons_iterator(nil const&) {} }; template <> struct cons_iterator
: iterator_base
> { typedef cons_iterator_tag tag; typedef nil const cons_type; cons_iterator() {} explicit cons_iterator(nil const&) {} }; struct nil : sequence_base
{ typedef cons_tag tag; typedef void_t car_type; typedef void_t cdr_type; }; template
struct cons : sequence_base
> { typedef cons_tag tag; typedef typename call_traits
::value_type car_type; typedef Cdr cdr_type; cons() : car(), cdr() {} explicit cons( typename call_traits
::param_type car_ , typename call_traits
::param_type cdr_ = Cdr()) : car(car_), cdr(cdr_) {} car_type car; cdr_type cdr; }; template
inline cons
make_cons(Car const& car) { return cons
(car); } template
inline cons
make_cons(Car const& car, Cdr const& cdr) { return cons
(car, cdr); } }} // namespace boost::fusion namespace boost { namespace mpl { template
struct begin_impl; template
struct end_impl; template <> struct begin_impl
: fusion::meta::begin_impl
{ }; template <> struct end_impl
: fusion::meta::end_impl
{ }; }} // namespace boost::mpl #endif // Before Boost v1.33.1, Fusion cons lists were not valid MPL sequences. #if BOOST_VERSION < 103301 namespace boost { namespace mpl { template
struct next; template
struct next
> : fusion::cons_detail::next_traits_impl
> { }; template
struct deref; template
struct deref
> : fusion::cons_detail::value_traits_impl
> { }; }} // namespace boost::mpl #endif #endif
cons.hpp
网页地址
文件地址
上一页
4/16
下一页
下载
( 8 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.