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 2003-2007 Joaqu�n M L�pez Mu�oz. * 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) * * See Boost website at http://www.boost.org/ */ #ifndef BOOST_DETAIL_ALLOCATOR_UTILITIES_HPP #define BOOST_DETAIL_ALLOCATOR_UTILITIES_HPP #include
/* keep it first to prevent nasty warns in MSVC */ #include
#include
#include
#include
#include
#include
#include
namespace boost{ namespace detail{ /* Allocator adaption layer. Some stdlibs provide allocators without rebind * and template ctors. These facilities are simulated with the external * template class rebind_to and the aid of partial_std_allocator_wrapper. */ namespace allocator{ /* partial_std_allocator_wrapper inherits the functionality of a std * allocator while providing a templatized ctor and other bits missing * in some stdlib implementation or another. */ template
class partial_std_allocator_wrapper:public std::allocator
{ public: /* Oddly enough, STLport does not define std::allocator
::value_type * when configured to work without partial template specialization. * No harm in supplying the definition here unconditionally. */ typedef Type value_type; partial_std_allocator_wrapper(){}; template
partial_std_allocator_wrapper(const partial_std_allocator_wrapper
&){} partial_std_allocator_wrapper(const std::allocator
& x): std::allocator
(x) { }; #if defined(BOOST_DINKUMWARE_STDLIB) /* Dinkumware guys didn't provide a means to call allocate() without * supplying a hint, in disagreement with the standard. */ Type* allocate(std::size_t n,const void* hint=0) { std::allocator
& a=*this; return a.allocate(n,hint); } #endif }; /* Detects whether a given allocator belongs to a defective stdlib not * having the required member templates. * Note that it does not suffice to check the Boost.Config stdlib * macros, as the user might have passed a custom, compliant allocator. * The checks also considers partial_std_allocator_wrapper to be * a standard defective allocator. */ #if defined(BOOST_NO_STD_ALLOCATOR)&&\ (defined(BOOST_HAS_PARTIAL_STD_ALLOCATOR)||defined(BOOST_DINKUMWARE_STDLIB)) template
struct is_partial_std_allocator { BOOST_STATIC_CONSTANT(bool, value= (is_same< std::allocator
, Allocator >::value)|| (is_same< partial_std_allocator_wrapper< BOOST_DEDUCED_TYPENAME Allocator::value_type>, Allocator >::value)); }; #else template
struct is_partial_std_allocator { BOOST_STATIC_CONSTANT(bool,value=false); }; #endif /* rebind operations for defective std allocators */ template
struct partial_std_allocator_rebind_to { typedef partial_std_allocator_wrapper
type; }; /* rebind operation in all other cases */ #if BOOST_WORKAROUND(BOOST_MSVC,<1300) /* Workaround for a problem in MSVC with dependent template typedefs * when doing rebinding of allocators. * Modeled after
(thanks, Aleksey!) */ template
struct rebinder { template
struct fake_allocator:Allocator{}; template<> struct fake_allocator
{ template
struct rebind{}; }; template
struct result: fake_allocator
::value>:: template rebind
{ }; }; #else template
struct rebinder { template
struct result { typedef typename Allocator::BOOST_NESTED_TEMPLATE rebind
::other other; }; }; #endif template
struct compliant_allocator_rebind_to { typedef typename rebinder
:: BOOST_NESTED_TEMPLATE result
::other type; }; /* rebind front-end */ template
struct rebind_to: mpl::eval_if_c< is_partial_std_allocator
::value, partial_std_allocator_rebind_to
, compliant_allocator_rebind_to
> { }; /* allocator-independent versions of construct and destroy */ template
void construct(void* p,const Type& t) { new (p) Type(t); } template
void destroy(const Type* p) { p->~Type(); } } /* namespace boost::detail::allocator */ } /* namespace boost::detail */ } /* namespace boost */ #endif
allocator_utilities.hpp
Page URL
File URL
Prev
2/61
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.