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 aligned_storage.hpp header file // See http://www.boost.org for updates, documentation, and revision history. //----------------------------------------------------------------------------- // // Copyright (c) 2002-2003 // Eric Friedman, Itay Maman // // 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) #ifndef BOOST_ALIGNED_STORAGE_HPP #define BOOST_ALIGNED_STORAGE_HPP #include
// for std::size_t #include "boost/config.hpp" #include "boost/detail/workaround.hpp" #include "boost/type_traits/alignment_of.hpp" #include "boost/type_traits/type_with_alignment.hpp" #include "boost/type_traits/is_pod.hpp" #include "boost/mpl/eval_if.hpp" #include "boost/mpl/identity.hpp" #include "boost/type_traits/detail/bool_trait_def.hpp" namespace boost { namespace detail { namespace aligned_storage { BOOST_STATIC_CONSTANT( std::size_t , alignment_of_max_align = ::boost::alignment_of
::value ); // // To be TR1 conforming this must be a POD type: // template < std::size_t size_ , std::size_t alignment_ > struct aligned_storage_imp { union data_t { char buf[size_]; typename mpl::eval_if_c< alignment_ == std::size_t(-1) , mpl::identity
, type_with_alignment
>::type align_; } data_; }; }} // namespace detail::aligned_storage template < std::size_t size_ , std::size_t alignment_ = std::size_t(-1) > class aligned_storage { private: // representation detail::aligned_storage::aligned_storage_imp
data_; public: // constants typedef detail::aligned_storage::aligned_storage_imp
type; BOOST_STATIC_CONSTANT( std::size_t , size = size_ ); BOOST_STATIC_CONSTANT( std::size_t , alignment = ( alignment_ == std::size_t(-1) ? ::boost::detail::aligned_storage::alignment_of_max_align : alignment_ ) ); #if defined(__GNUC__) &&\ (__GNUC__ > 3) ||\ (__GNUC__ == 3 && (__GNUC_MINOR__ > 2 ||\ (__GNUC_MINOR__ == 2 && __GNUC_PATCHLEVEL__ >=3))) private: // noncopyable aligned_storage(const aligned_storage&); aligned_storage& operator=(const aligned_storage&); #else // gcc less than 3.2.3 public: // _should_ be noncopyable, but GCC compiler emits error aligned_storage(const aligned_storage&); aligned_storage& operator=(const aligned_storage&); #endif // gcc < 3.2.3 workaround public: // structors aligned_storage() { } ~aligned_storage() { } public: // accessors void* address() { return this; } #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) const void* address() const { return this; } #else // MSVC6 const void* address() const; #endif // MSVC6 workaround }; #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // MSVC6 seems not to like inline functions with const void* returns, so we // declare the following here: template
const void* aligned_storage
::address() const { return const_cast< aligned_storage
* >(this)->address(); } #endif // MSVC6 workaround #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // // Make sure that is_pod recognises aligned_storage<>::type // as a POD (Note that aligned_storage<> itself is not a POD): // template
struct is_pod
> BOOST_TT_AUX_BOOL_C_BASE(true) { BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(true) }; #endif } // namespace boost #include "boost/type_traits/detail/bool_trait_undef.hpp" #endif // BOOST_ALIGNED_STORAGE_HPP
aligned_storage.hpp
Page URL
File URL
Prev 1/113
Next
Download
( 4 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.