DriveHQ Start Menu
Cloud Drive Mapping
Folder Sync
Cloud Backup
True Drop Box
FTP/SFTP Hosting
Group Account
DriveHQ Start Menu
Online File Server
My Storage
|
Manage Shares
|
Publishes
|
Drop Boxes
|
Group Account
WebDAV Drive Mapping
Cloud Drive Home
|
WebDAV Guide
|
Drive Mapping Tool
|
Drive Mapping URL
Complete Data Backup
Backup Guide
|
Online Backup Tool
|
Cloud-to-Cloud Backup
FTP, Email & Web Service
FTP Home
|
FTP Hosting FAQ
|
Email Hosting
|
EmailManager
|
Web Hosting
Help & Resources
About
|
Enterprise Service
|
Partnership
|
Comparisons
|
Support
Quick Links
Security and Privacy
Download Software
Service Manual
Use Cases
Group Account
Online Help
Blog
Contact
Cloud Surveillance
Sign Up
Login
Features
Business Features
Online File Server
FTP Hosting
Cloud Drive Mapping
Cloud File Backup
Email Backup & Hosting
Cloud File Sharing
Folder Synchronization
Group Management
True Drop Box
Full-text Search
AD Integration/SSO
Mobile Access
IP Camera & DVR Solution
More...
Personal Features
Personal Cloud Drive
Backup All Devices
Mobile APPs
Personal Web Hosting
Sub-Account (for Kids)
Home/PC/Kids Monitoring
More...
Software
DriveHQ Drive Mapping Tool
DriveHQ FileManager
DriveHQ Online Backup
DriveHQ Mobile Apps
Pricing
Business Plans & Pricing
Personal Plans & Pricing
Price Comparison with Others
Feature Comparison with Others
Install Mobile App
Sign up
Creating account...
Invalid character in username! Only 0-9, a-z, A-Z, _, -, . allowed.
Username is required!
Invalid email address!
E-mail is required!
Password is required!
Password is invalid!
Password and confirmation do not match.
Confirm password is required!
I accept
Membership Agreement
Please read the Membership Agreement and check "I accept"!
Free Quick Sign-up
Sign-up Page
Log in
Signing in...
Username or e-mail address is required!
Password is required!
Keep me logged in
Quick Login
Forgot Password
Up
Upload
Download
Share
Publish
New Folder
New File
Copy
Cut
Delete
Paste
Rate
Upgrade
Rotate
Effect
Edit
Slide
History
/*============================================================================= 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
Page URL
File URL
Prev
6/6 Next
Download
( 7 KB )
Note: The DriveHQ service banners will NOT be displayed if the file owner is a paid member.
Comments
Total ratings:
0
Average rating:
Not Rated
Would you like to comment?
Join DriveHQ
for a free account, or
Logon
if you are already a member.