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 - operator_lambda_func_base.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 www.boost.org // ------------------------------------------------------------ #ifndef BOOST_LAMBDA_OPERATOR_LAMBDA_FUNC_BASE_HPP #define BOOST_LAMBDA_OPERATOR_LAMBDA_FUNC_BASE_HPP namespace boost { namespace lambda { // These operators cannot be implemented as apply functions of action // templates // Specialization for comma. template
class lambda_functor_base
, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template
RET call(CALL_FORMAL_ARGS) const { return detail::select(boost::tuples::get<0>(args), CALL_ACTUAL_ARGS), detail::select(boost::tuples::get<1>(args), CALL_ACTUAL_ARGS); } template
struct sig { private: typedef typename detail::deduce_argument_types
::type rets_t; public: typedef typename return_type_2_comma< // comma needs special handling typename detail::element_or_null<0, rets_t>::type, typename detail::element_or_null<1, rets_t>::type >::type type; }; }; namespace detail { // helper traits to make the expression shorter, takes binary action // bound argument tuple, open argument tuple and gives the return type template
class binary_rt { private: typedef typename detail::deduce_argument_types
::type rets_t; public: typedef typename return_type_2_prot< Action, typename detail::element_or_null<0, rets_t>::type, typename detail::element_or_null<1, rets_t>::type >::type type; }; // same for unary actions template
class unary_rt { private: typedef typename detail::deduce_argument_types
::type rets_t; public: typedef typename return_type_1_prot< Action, typename detail::element_or_null<0, rets_t>::type >::type type; }; } // end detail // Specialization for logical and (to preserve shortcircuiting) // this could be done with a macro as the others, code used to be different template
class lambda_functor_base
, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template
RET call(CALL_FORMAL_ARGS) const { return detail::select(boost::tuples::get<0>(args), CALL_ACTUAL_ARGS) && detail::select(boost::tuples::get<1>(args), CALL_ACTUAL_ARGS); } template
struct sig { typedef typename detail::binary_rt
, Args, SigArgs>::type type; }; }; // Specialization for logical or (to preserve shortcircuiting) // this could be done with a macro as the others, code used to be different template
class lambda_functor_base
, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template
RET call(CALL_FORMAL_ARGS) const { return detail::select(boost::tuples::get<0>(args), CALL_ACTUAL_ARGS) || detail::select(boost::tuples::get<1>(args), CALL_ACTUAL_ARGS); } template
struct sig { typedef typename detail::binary_rt
, Args, SigArgs>::type type; }; }; // Specialization for subscript template
class lambda_functor_base
, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template
RET call(CALL_FORMAL_ARGS) const { return detail::select(boost::tuples::get<0>(args), CALL_ACTUAL_ARGS) [detail::select(boost::tuples::get<1>(args), CALL_ACTUAL_ARGS)]; } template
struct sig { typedef typename detail::binary_rt
, Args, SigArgs>::type type; }; }; #define BOOST_LAMBDA_BINARY_ACTION(SYMBOL, ACTION_CLASS) \ template
\ class lambda_functor_base
{ \ public: \ Args args; \ public: \ explicit lambda_functor_base(const Args& a) : args(a) {} \ \ template
\ RET call(CALL_FORMAL_ARGS) const { \ return detail::select(boost::tuples::get<0>(args), CALL_ACTUAL_ARGS) \ SYMBOL \ detail::select(boost::tuples::get<1>(args), CALL_ACTUAL_ARGS); \ } \ template
struct sig { \ typedef typename \ detail::binary_rt
::type type; \ }; \ }; #define BOOST_LAMBDA_PREFIX_UNARY_ACTION(SYMBOL, ACTION_CLASS) \ template
\ class lambda_functor_base
{ \ public: \ Args args; \ public: \ explicit lambda_functor_base(const Args& a) : args(a) {} \ \ template
\ RET call(CALL_FORMAL_ARGS) const { \ return SYMBOL \ detail::select(boost::tuples::get<0>(args), CALL_ACTUAL_ARGS); \ } \ template
struct sig { \ typedef typename \ detail::unary_rt
::type type; \ }; \ }; #define BOOST_LAMBDA_POSTFIX_UNARY_ACTION(SYMBOL, ACTION_CLASS) \ template
\ class lambda_functor_base
{ \ public: \ Args args; \ public: \ explicit lambda_functor_base(const Args& a) : args(a) {} \ \ template
\ RET call(CALL_FORMAL_ARGS) const { \ return \ detail::select(boost::tuples::get<0>(args), CALL_ACTUAL_ARGS) SYMBOL; \ } \ template
struct sig { \ typedef typename \ detail::unary_rt
::type type; \ }; \ }; BOOST_LAMBDA_BINARY_ACTION(+,arithmetic_action
) BOOST_LAMBDA_BINARY_ACTION(-,arithmetic_action
) BOOST_LAMBDA_BINARY_ACTION(*,arithmetic_action
) BOOST_LAMBDA_BINARY_ACTION(/,arithmetic_action
) BOOST_LAMBDA_BINARY_ACTION(%,arithmetic_action
) BOOST_LAMBDA_BINARY_ACTION(<<,bitwise_action
) BOOST_LAMBDA_BINARY_ACTION(>>,bitwise_action
) BOOST_LAMBDA_BINARY_ACTION(&,bitwise_action
) BOOST_LAMBDA_BINARY_ACTION(|,bitwise_action
) BOOST_LAMBDA_BINARY_ACTION(^,bitwise_action
) BOOST_LAMBDA_BINARY_ACTION(<,relational_action
) BOOST_LAMBDA_BINARY_ACTION(>,relational_action
) BOOST_LAMBDA_BINARY_ACTION(<=,relational_action
) BOOST_LAMBDA_BINARY_ACTION(>=,relational_action
) BOOST_LAMBDA_BINARY_ACTION(==,relational_action
) BOOST_LAMBDA_BINARY_ACTION(!=,relational_action
) BOOST_LAMBDA_BINARY_ACTION(+=,arithmetic_assignment_action
) BOOST_LAMBDA_BINARY_ACTION(-=,arithmetic_assignment_action
) BOOST_LAMBDA_BINARY_ACTION(*=,arithmetic_assignment_action
) BOOST_LAMBDA_BINARY_ACTION(/=,arithmetic_assignment_action
) BOOST_LAMBDA_BINARY_ACTION(%=,arithmetic_assignment_action
) BOOST_LAMBDA_BINARY_ACTION(<<=,bitwise_assignment_action
) BOOST_LAMBDA_BINARY_ACTION(>>=,bitwise_assignment_action
) BOOST_LAMBDA_BINARY_ACTION(&=,bitwise_assignment_action
) BOOST_LAMBDA_BINARY_ACTION(|=,bitwise_assignment_action
) BOOST_LAMBDA_BINARY_ACTION(^=,bitwise_assignment_action
) BOOST_LAMBDA_BINARY_ACTION(=,other_action< assignment_action>) BOOST_LAMBDA_PREFIX_UNARY_ACTION(+, unary_arithmetic_action
) BOOST_LAMBDA_PREFIX_UNARY_ACTION(-, unary_arithmetic_action
) BOOST_LAMBDA_PREFIX_UNARY_ACTION(~, bitwise_action
) BOOST_LAMBDA_PREFIX_UNARY_ACTION(!, logical_action
) BOOST_LAMBDA_PREFIX_UNARY_ACTION(++, pre_increment_decrement_action
) BOOST_LAMBDA_PREFIX_UNARY_ACTION(--, pre_increment_decrement_action
) BOOST_LAMBDA_PREFIX_UNARY_ACTION(&,other_action
) BOOST_LAMBDA_PREFIX_UNARY_ACTION(*,other_action
) BOOST_LAMBDA_POSTFIX_UNARY_ACTION(++, post_increment_decrement_action
) BOOST_LAMBDA_POSTFIX_UNARY_ACTION(--, post_increment_decrement_action
) #undef BOOST_LAMBDA_POSTFIX_UNARY_ACTION #undef BOOST_LAMBDA_PREFIX_UNARY_ACTION #undef BOOST_LAMBDA_BINARY_ACTION } // namespace lambda } // namespace boost #endif
operator_lambda_func_base.hpp
Page URL
File URL
Prev
15/20
Next
Download
( 11 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.