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
// tuple_comparison.hpp ----------------------------------------------------- // // Copyright (C) 2001 Jaakko J�rvi (jaakko.jarvi@cs.utu.fi) // Copyright (C) 2001 Gary Powell (gary.powell@sierra.com) // // 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 // // (The idea and first impl. of comparison operators was from Doug Gregor) // ----------------------------------------------------------------- #ifndef BOOST_TUPLE_COMPARISON_HPP #define BOOST_TUPLE_COMPARISON_HPP #include "boost/tuple/tuple.hpp" // ------------------------------------------------------------- // equality and comparison operators // // == and != compare tuples elementwise // <, >, <= and >= use lexicographical ordering // // Any operator between tuples of different length fails at compile time // No dependencies between operators are assumed // (i.e. !(a
=b, a!=b does not imply a==b etc. // so any weirdnesses of elementary operators are respected). // // ------------------------------------------------------------- namespace boost { namespace tuples { inline bool operator==(const null_type&, const null_type&) { return true; } inline bool operator>=(const null_type&, const null_type&) { return true; } inline bool operator<=(const null_type&, const null_type&) { return true; } inline bool operator!=(const null_type&, const null_type&) { return false; } inline bool operator<(const null_type&, const null_type&) { return false; } inline bool operator>(const null_type&, const null_type&) { return false; } namespace detail { // comparison operators check statically the length of its operands and // delegate the comparing task to the following functions. Hence // the static check is only made once (should help the compiler). // These functions assume tuples to be of the same length. template
inline bool eq(const T1& lhs, const T2& rhs) { return lhs.get_head() == rhs.get_head() && eq(lhs.get_tail(), rhs.get_tail()); } template<> inline bool eq
(const null_type&, const null_type&) { return true; } template
inline bool neq(const T1& lhs, const T2& rhs) { return lhs.get_head() != rhs.get_head() || neq(lhs.get_tail(), rhs.get_tail()); } template<> inline bool neq
(const null_type&, const null_type&) { return false; } template
inline bool lt(const T1& lhs, const T2& rhs) { return lhs.get_head() < rhs.get_head() || !(rhs.get_head() < lhs.get_head()) && lt(lhs.get_tail(), rhs.get_tail()); } template<> inline bool lt
(const null_type&, const null_type&) { return false; } template
inline bool gt(const T1& lhs, const T2& rhs) { return lhs.get_head() > rhs.get_head() || !(rhs.get_head() > lhs.get_head()) && gt(lhs.get_tail(), rhs.get_tail()); } template<> inline bool gt
(const null_type&, const null_type&) { return false; } template
inline bool lte(const T1& lhs, const T2& rhs) { return lhs.get_head() <= rhs.get_head() && ( !(rhs.get_head() <= lhs.get_head()) || lte(lhs.get_tail(), rhs.get_tail())); } template<> inline bool lte
(const null_type&, const null_type&) { return true; } template
inline bool gte(const T1& lhs, const T2& rhs) { return lhs.get_head() >= rhs.get_head() && ( !(rhs.get_head() >= lhs.get_head()) || gte(lhs.get_tail(), rhs.get_tail())); } template<> inline bool gte
(const null_type&, const null_type&) { return true; } } // end of namespace detail // equal ---- template
inline bool operator==(const cons
& lhs, const cons
& rhs) { // check that tuple lengths are equal BOOST_STATIC_ASSERT(length
::value == length
::value); return detail::eq(lhs, rhs); } // not equal ----- template
inline bool operator!=(const cons
& lhs, const cons
& rhs) { // check that tuple lengths are equal BOOST_STATIC_ASSERT(length
::value == length
::value); return detail::neq(lhs, rhs); } // < template
inline bool operator<(const cons
& lhs, const cons
& rhs) { // check that tuple lengths are equal BOOST_STATIC_ASSERT(length
::value == length
::value); return detail::lt(lhs, rhs); } // > template
inline bool operator>(const cons
& lhs, const cons
& rhs) { // check that tuple lengths are equal BOOST_STATIC_ASSERT(length
::value == length
::value); return detail::gt(lhs, rhs); } // <= template
inline bool operator<=(const cons
& lhs, const cons
& rhs) { // check that tuple lengths are equal BOOST_STATIC_ASSERT(length
::value == length
::value); return detail::lte(lhs, rhs); } // >= template
inline bool operator>=(const cons
& lhs, const cons
& rhs) { // check that tuple lengths are equal BOOST_STATIC_ASSERT(length
::value == length
::value); return detail::gte(lhs, rhs); } } // end of namespace tuples } // end of namespace boost #endif // BOOST_TUPLE_COMPARISON_HPP
tuple_comparison.hpp
Page URL
File URL
Prev
2/3
Next
Download
( 5 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.