x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
find_if.hpp - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\boost_1_35_0\boost\fusion\algorithm\query\detail\find_if.hpp
旋转
特效
属性
历史版本
/*============================================================================= Copyright (c) 2001-2006 Joel de Guzman Copyright (c) 2007 Dan Marsden 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(FUSION_FIND_IF_05052005_1107) #define FUSION_FIND_IF_05052005_1107 #include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
namespace boost { namespace fusion { struct random_access_traversal_tag; namespace detail { template
struct apply_filter { typedef typename mpl::apply1< Pred, typename result_of::value_of
::type>::type type; BOOST_STATIC_CONSTANT(int, value = type::value); }; template
struct main_find_if; template
struct recursive_find_if { typedef typename main_find_if< typename result_of::next
::type, Last, Pred >::type type; }; template
struct main_find_if { typedef mpl::or_< result_of::equal_to
, apply_filter
> filter; typedef typename mpl::eval_if< filter , mpl::identity
, recursive_find_if
>::type type; }; template< typename First, typename Last, typename Pred, bool> struct choose_find_if; template
struct choose_find_if
: main_find_if
{}; template
struct unroll_again; template
struct apply_offset_filter { typedef typename result_of::advance_c
::type Shifted; typedef typename mpl::apply1< Pred , typename result_of::value_of
::type >::type type; BOOST_STATIC_CONSTANT(int, value = type::value); }; template
struct unrolled_find_if { typedef typename mpl::eval_if< apply_filter
, mpl::identity
, mpl::eval_if< apply_offset_filter
, result_of::advance_c
, mpl::eval_if< apply_offset_filter
, result_of::advance_c
, mpl::eval_if< apply_offset_filter
, result_of::advance_c
, unroll_again< Iter, Pred, n, 4> > > > >::type type; }; template
struct unrolled_find_if
{ typedef typename mpl::eval_if< apply_filter
, mpl::identity
, mpl::eval_if< apply_offset_filter
, result_of::advance_c
, mpl::eval_if< apply_offset_filter
, result_of::advance_c
, result_of::advance_c
> > >::type type; }; template
struct unrolled_find_if
{ typedef typename mpl::eval_if< apply_filter
, mpl::identity
, mpl::eval_if< apply_offset_filter
, result_of::advance_c
, result_of::advance_c
> >::type type; }; template
struct unrolled_find_if
{ typedef typename mpl::eval_if< apply_filter
, mpl::identity
, result_of::advance_c
>::type type; }; template
struct unroll_again { typedef typename unrolled_find_if< typename result_of::advance_c
::type, Pred, n-unrolling>::type type; }; template
struct unrolled_find_if
{ typedef Iter type; }; template
struct choose_find_if
{ typedef typename result_of::distance
::type N; typedef typename unrolled_find_if
::type type; }; template
struct static_find_if { typedef typename choose_find_if< First , Last , typename mpl::lambda
::type , is_base_of
::type>::value >::type type; template
static type recursive_call(Iterator const& iter, mpl::true_) { return iter; } template
static type recursive_call(Iterator const& iter, mpl::false_) { return recursive_call(fusion::next(iter)); } template
static type recursive_call(Iterator const& iter) { typedef result_of::equal_to
found; return recursive_call(iter, found()); } template
static type choose_call(Iterator const& iter, Tag) { return recursive_call(iter); } template
static type choose_call(Iterator const& iter, random_access_traversal_tag) { typedef typename result_of::distance
::type N; return fusion::advance
(iter); } template
static type call(Iterator const& iter) { return choose_call(iter, typename traits::category_of
::type()); } }; template
struct static_seq_find_if : static_find_if
{ typedef typename static_find_if
::type type; template
static type call(Sequence const& seq) { return static_find_if
::call(fusion::begin(seq)); } template
static type call(Sequence& seq) { return static_find_if
::call(fusion::begin(seq)); } }; }}} #endif
find_if.hpp
网页地址
文件地址
上一页
6/6 下一页
下载
( 7 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.