x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
find_if_s.hpp - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\boost_1_35_0\boost\fusion\algorithm\query\ext_\find_if_s.hpp
旋转
特效
属性
历史版本
/*============================================================================= Copyright (c) 2006 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) ==============================================================================*/ #if !defined(FIND_IF_S_05152006_1027) #define FIND_IF_S_05152006_1027 #include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
// fwd declarations namespace boost { namespace fusion { namespace detail { template
::value> struct static_find_if_s_recurse; } namespace result_of { template
struct find_if_s; } }} namespace boost { namespace fusion { namespace detail { template
::value> struct is_found : mpl::not_
::type> > {}; template
struct is_found
: mpl::not_
> {}; template< typename SegmentedRange , typename Where , typename Sequence = typename remove_reference< typename result_of::deref< typename SegmentedRange::iterator_type >::type >::type , bool IsSegmented = traits::is_segmented
::value > struct as_segmented_cons { typedef cons< SegmentedRange , cons
> > type; static type call(SegmentedRange const &range, Where const &where) { return fusion::make_cons( range , fusion::make_cons( segmented_range
(*fusion::begin(range), where) ) ); } }; template< typename SegmentedRange , typename Where , typename Sequence > struct as_segmented_cons
{ typedef cons
type; static type call(SegmentedRange const &range, Where const &where) { return fusion::make_cons(range, where); } }; template< typename SegmentedRange , typename Pred , bool IsEmpty = is_empty
::value > struct static_find_if_s_seg { typedef typename SegmentedRange::iterator_type first; typedef typename result_of::deref
::type segment_ref; typedef typename remove_reference
::type segment; typedef static_find_if_s_recurse
where; typedef range_next
next; typedef is_found
is_found; typedef as_segmented_cons
found; typedef static_find_if_s_seg
not_found; typedef typename mpl::eval_if
::type type; static type call(SegmentedRange const &range) { return call_(range, is_found()); } private: static type call_(SegmentedRange const &range, mpl::true_) { return found::call(range, where::call(*range.where_)); } static type call_(SegmentedRange const &range, mpl::false_) { return not_found::call(next::call(range)); } }; template< typename SegmentedRange , typename Pred > struct static_find_if_s_seg
{ typedef nil type; static type call(SegmentedRange const &) { return nil(); } }; template
struct static_find_if_s_recurse
{ typedef typename as_segmented_range
::type range; typedef static_find_if_s_seg
find_if; typedef typename find_if::type type; static type call(Sequence &seq) { return find_if::call(range(fusion::segments(seq))); } }; template
struct static_find_if_s_recurse
{ typedef typename result_of::find_if
::type type; static type call(Sequence &seq) { return fusion::find_if
(seq); } }; template
::value> struct static_find_if_s : static_find_if_s_recurse
{}; template
struct static_find_if_s
{ typedef typename as_segmented_range
::type range; typedef static_find_if_s_recurse
find_if; typedef typename find_if::type found; typedef segmented_iterator
::type> type; static type call(Sequence &seq) { return type(reverse_cons
::call(find_if::call(seq))); } }; }}} namespace boost { namespace fusion { namespace result_of { template
struct find_if_s { typedef typename detail::static_find_if_s< Sequence , Pred >::type type; }; } template
typename lazy_disable_if< is_const
, result_of::find_if_s
>::type find_if_s(Sequence& seq) { return detail::static_find_if_s
::call(seq); } template
typename result_of::find_if_s
::type find_if_s(Sequence const& seq) { return detail::static_find_if_s
::call(seq); } }} #endif
find_if_s.hpp
网页地址
文件地址
上一页 1/1 下一页
下载
( 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.