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 2005 Alexander Nasonov. // 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 FILE_boost_type_traits_integral_promotion_hpp_INCLUDED #define FILE_boost_type_traits_integral_promotion_hpp_INCLUDED #include
#include
#include
#include
#include
#include
#include
#include
// Should be the last #include #include
namespace boost { namespace type_traits { namespace detail { // 4.5/2 template
struct need_promotion : boost::is_enum
{}; // 4.5/1 template<> struct need_promotion
: true_type {}; template<> struct need_promotion
: true_type {}; template<> struct need_promotion
: true_type {}; template<> struct need_promotion
: true_type {}; template<> struct need_promotion
: true_type {}; // Specializations for non-standard types. // Type is promoted if it's smaller then int. #define BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(T) \ template<> struct need_promotion
\ : integral_constant
{}; // Same set of integral types as in boost/type_traits/is_integral.hpp. // Please, keep in sync. #if (defined(BOOST_MSVC) && (BOOST_MSVC < 1300)) \ || (defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 600)) \ || (defined(__BORLANDC__) && (__BORLANDC__ == 0x600) && (_MSC_VER < 1300)) // TODO: common macro for this #if. Or better yet, PP SEQ of non-standard types. BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(__int8 ) BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(unsigned __int8 ) BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(__int16 ) BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(unsigned __int16) BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(__int32 ) BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(unsigned __int32) #ifdef __BORLANDC__ BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(unsigned __int64) BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE( __int64) #endif #endif #if defined(BOOST_HAS_LONG_LONG) BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(boost::ulong_long_type) BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(boost::long_long_type ) #elif defined(BOOST_HAS_MS_INT64) BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(unsigned __int64) BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE( __int64) #endif #undef BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE #ifndef BOOST_NO_INTRINSIC_WCHAR_T // 4.5/2 template<> struct need_promotion
: true_type {}; #endif // 4.5/3 (integral bit-field) is not supported. // 4.5/4 template<> struct need_promotion
: true_type {}; // Get promoted type by index and cv qualifiers. template
struct promote_from_index; #define BOOST_TT_AUX_PROMOTE_FROM_INDEX(N,T) \ template<> struct promote_from_index
{ typedef T type; }; \ template<> struct promote_from_index
{ typedef T volatile type; }; \ template<> struct promote_from_index
{ typedef T const type; }; \ template<> struct promote_from_index
{ typedef T const volatile type; }; BOOST_TT_AUX_PROMOTE_FROM_INDEX(1, int ) BOOST_TT_AUX_PROMOTE_FROM_INDEX(2, unsigned int ) BOOST_TT_AUX_PROMOTE_FROM_INDEX(3, long ) BOOST_TT_AUX_PROMOTE_FROM_INDEX(4, unsigned long) // WARNING: integral promotions to non-standard types // long long and __int64 are not defined by the standard. // Additional specialisations and overloads shouldn't // introduce ambiguity, though. #if defined(BOOST_HAS_LONG_LONG) BOOST_TT_AUX_PROMOTE_FROM_INDEX(5, boost::long_long_type ) BOOST_TT_AUX_PROMOTE_FROM_INDEX(6, boost::ulong_long_type) #elif defined(BOOST_HAS_MS_INT64) BOOST_TT_AUX_PROMOTE_FROM_INDEX(7, __int64 ) BOOST_TT_AUX_PROMOTE_FROM_INDEX(8, unsigned __int64) #endif #undef BOOST_TT_AUX_PROMOTE_FROM_INDEX // Define BOOST_TT_AUX_PROMOTED_INDEX_TESTER: #if !defined(BOOST_MSVC) template
struct sized_type_for_promotion { typedef char (&type)[N]; }; #define BOOST_TT_AUX_PROMOTED_INDEX_TESTER(I,T) \ sized_type_for_promotion
::type promoted_index_tester(T); #else #define BOOST_TT_AUX_PROMOTED_INDEX_TESTER(I,T) \ char (&promoted_index_tester(T))[I]; #endif BOOST_TT_AUX_PROMOTED_INDEX_TESTER(1, int ) BOOST_TT_AUX_PROMOTED_INDEX_TESTER(2, unsigned int ) BOOST_TT_AUX_PROMOTED_INDEX_TESTER(3, long ) BOOST_TT_AUX_PROMOTED_INDEX_TESTER(4, unsigned long) #if defined(BOOST_HAS_LONG_LONG) BOOST_TT_AUX_PROMOTED_INDEX_TESTER(5, boost::long_long_type ) BOOST_TT_AUX_PROMOTED_INDEX_TESTER(6, boost::ulong_long_type) #elif defined(BOOST_HAS_MS_INT64) BOOST_TT_AUX_PROMOTED_INDEX_TESTER(7, __int64 ) BOOST_TT_AUX_PROMOTED_INDEX_TESTER(8, unsigned __int64) #endif #undef BOOST_TT_AUX_PROMOTED_INDEX_TESTER // Get an index of promoted type for type T. // Precondition: need_promotion
template
struct promoted_index { static T testee; // undefined BOOST_STATIC_CONSTANT(int, value = sizeof(promoted_index_tester(+testee)) ); // Unary plus promotes testee LOOK HERE ---> ^ }; template
struct integral_promotion_impl { typedef BOOST_DEDUCED_TYPENAME promote_from_index< (boost::type_traits::detail::promoted_index
::value) , (boost::is_const
::value) , (boost::is_volatile
::value) >::type type; }; template
struct integral_promotion : boost::mpl::eval_if< need_promotion
::type> , integral_promotion_impl
, boost::mpl::identity
> { }; } } BOOST_TT_AUX_TYPE_TRAIT_DEF1( integral_promotion , T , BOOST_DEDUCED_TYPENAME boost::type_traits::detail::integral_promotion
::type ) } #include
#endif // #ifndef FILE_boost_type_traits_integral_promotion_hpp_INCLUDED
integral_promotion.hpp
Page URL
File URL
Prev
31/83
Next
Download
( 6 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.