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
// Boost Lambda Library - lambda_functors.hpp ------------------------------- // Copyright (C) 1999, 2000 Jaakko J�rvi (jaakko.jarvi@cs.utu.fi) // // 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) // // For more information, see http://www.boost.org // ------------------------------------------------ #ifndef BOOST_LAMBDA_LAMBDA_FUNCTORS_HPP #define BOOST_LAMBDA_LAMBDA_FUNCTORS_HPP namespace boost { namespace lambda { // -- lambda_functor -------------------------------------------- // -------------------------------------------------------------- //inline const null_type const_null_type() { return null_type(); } namespace detail { namespace { static const null_type constant_null_type = null_type(); } // unnamed } // detail class unused {}; #define cnull_type() detail::constant_null_type // -- free variables types -------------------------------------------------- // helper to work around the case where the nullary return type deduction // is always performed, even though the functor is not nullary namespace detail { template
struct get_element_or_null_type { typedef typename detail::tuple_element_as_reference
::type type; }; template
struct get_element_or_null_type
{ typedef null_type type; }; } template
struct placeholder; template<> struct placeholder
{ template
struct sig { typedef typename detail::get_element_or_null_type<0, SigArgs>::type type; }; template
RET call(CALL_FORMAL_ARGS) const { BOOST_STATIC_ASSERT(boost::is_reference
::value); CALL_USE_ARGS; // does nothing, prevents warnings for unused args return a; } }; template<> struct placeholder
{ template
struct sig { typedef typename detail::get_element_or_null_type<1, SigArgs>::type type; }; template
RET call(CALL_FORMAL_ARGS) const { CALL_USE_ARGS; return b; } }; template<> struct placeholder
{ template
struct sig { typedef typename detail::get_element_or_null_type<2, SigArgs>::type type; }; template
RET call(CALL_FORMAL_ARGS) const { CALL_USE_ARGS; return c; } }; template<> struct placeholder
{ template
struct sig { typedef typename detail::get_element_or_null_type<3, SigArgs>::type type; }; template
RET call(CALL_FORMAL_ARGS) const { CALL_USE_ARGS; return env; } }; typedef const lambda_functor
> placeholder1_type; typedef const lambda_functor
> placeholder2_type; typedef const lambda_functor
> placeholder3_type; /////////////////////////////////////////////////////////////////////////////// // free variables are lambda_functors. This is to allow uniform handling with // other lambda_functors. // ------------------------------------------------------------------- // -- lambda_functor NONE ------------------------------------------------ template
class lambda_functor : public T { BOOST_STATIC_CONSTANT(int, arity_bits = get_arity
::value); public: typedef T inherited; lambda_functor() {} lambda_functor(const lambda_functor& l) : inherited(l) {} lambda_functor(const T& t) : inherited(t) {} template
struct sig { typedef typename inherited::template sig
::type type; }; // Note that this return type deduction template is instantiated, even // if the nullary // operator() is not called at all. One must make sure that it does not fail. typedef typename inherited::template sig
::type nullary_return_type; nullary_return_type operator()() const { return inherited::template call
(cnull_type(), cnull_type(), cnull_type(), cnull_type()); } template
typename inherited::template sig
>::type operator()(A& a) const { return inherited::template call< typename inherited::template sig
>::type >(a, cnull_type(), cnull_type(), cnull_type()); } template
typename inherited::template sig
>::type operator()(A const& a) const { return inherited::template call< typename inherited::template sig
>::type >(a, cnull_type(), cnull_type(), cnull_type()); } template
typename inherited::template sig
>::type operator()(A& a, B& b) const { return inherited::template call< typename inherited::template sig
>::type >(a, b, cnull_type(), cnull_type()); } template
typename inherited::template sig
>::type operator()(A const& a, B& b) const { return inherited::template call< typename inherited::template sig
>::type >(a, b, cnull_type(), cnull_type()); } template
typename inherited::template sig
>::type operator()(A& a, B const& b) const { return inherited::template call< typename inherited::template sig
>::type >(a, b, cnull_type(), cnull_type()); } template
typename inherited::template sig
>::type operator()(A const& a, B const& b) const { return inherited::template call< typename inherited::template sig
>::type >(a, b, cnull_type(), cnull_type()); } template
typename inherited::template sig
>::type operator()(A& a, B& b, C& c) const { return inherited::template call< typename inherited::template sig
>::type >(a, b, c, cnull_type()); } template
typename inherited::template sig
>::type operator()(A const& a, B const& b, C const& c) const { return inherited::template call< typename inherited::template sig
>::type >(a, b, c, cnull_type()); } // for internal calls with env template
typename inherited::template sig
>::type internal_call(CALL_FORMAL_ARGS) const { return inherited::template call
>::type>(CALL_ACTUAL_ARGS); } template
const lambda_functor
, boost::tuple
::type> > > operator=(const A& a) const { return lambda_functor_base< other_action
, boost::tuple
::type> > ( boost::tuple
::type>(*this, a) ); } template
const lambda_functor
, boost::tuple
::type> > > operator[](const A& a) const { return lambda_functor_base< other_action
, boost::tuple
::type> > ( boost::tuple
::type>(*this, a ) ); } }; } // namespace lambda } // namespace boost // is_placeholder #include
namespace boost { template<> struct is_placeholder< lambda::lambda_functor< lambda::placeholder
> > { enum _vt { value = 1 }; }; template<> struct is_placeholder< lambda::lambda_functor< lambda::placeholder
> > { enum _vt { value = 2 }; }; template<> struct is_placeholder< lambda::lambda_functor< lambda::placeholder
> > { enum _vt { value = 3 }; }; } // namespace boost #endif
lambda_functors.hpp
Page URL
File URL
Prev
10/20
Next
Download
( 8 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.