DriveHQ Start Menu
Cloud Drive Mapping
Folder Sync
True Drop Box
FTP/SFTP Hosting
Group Account
Team Anywhere
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
|
Cloud-to-Cloud Backup
|
DVR/Camera Backup
FTP, Email & Web Service
FTP/SFTP Hosting
|
Email Hosting
|
Web Hosting
|
Webcam Hosting
Other Products & Services
Team Anywhere
|
Connect to Remote PC
|
Cloud Surveillance
|
Virtual CCTV NVR
Quick Links
Security and Privacy
Customer Support
Service Manual
Use Cases
Group Account
Online Help
Support Forum
Contact Us
About DriveHQ
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
Personal Features
Personal Cloud Drive
Backup All Devices
Mobile APPs
Personal Web Hosting
Sub-Account (for Kids)
Home/PC/Kids Monitoring
Other Features
Team Anywhere (Remote Desktop Service)
CameraFTP Cloud Surveillance
Software
DriveHQ Drive Mapping Tool
DriveHQ FileManager
DriveHQ Online Backup
DriveHQ Team Anywhere for Windows (Beta)
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 (C) 2005 Igor Chesnokov, mailto:ichesnokov@gmail.com (VC 6.5,VC 7.1 + counter code) // Copyright (C) 2005-2007 Peder Holt (VC 7.0 + framework) // Copyright (C) 2006 Steven Watanabe (VC 8.0) // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_TYPEOF_MSVC_TYPEOF_IMPL_HPP_INCLUDED # define BOOST_TYPEOF_MSVC_TYPEOF_IMPL_HPP_INCLUDED # include
# include
# include
# include
# include
# if BOOST_WORKAROUND(BOOST_MSVC,>=1310) # include
# endif namespace boost { namespace type_of { //Compile time constant code # if BOOST_WORKAROUND(BOOST_MSVC,>=1300) && defined(_MSC_EXTENSIONS) template
struct the_counter; template
struct encode_counter { __if_exists(the_counter
) { BOOST_STATIC_CONSTANT(unsigned,count=(encode_counter
::count)); } __if_not_exists(the_counter
) { __if_exists(the_counter
) { BOOST_STATIC_CONSTANT(unsigned,count=(encode_counter
::count)); } __if_not_exists(the_counter
) { __if_exists(the_counter
) { BOOST_STATIC_CONSTANT(unsigned,count=(encode_counter
::count)); } __if_not_exists(the_counter
) { __if_exists(the_counter
) { BOOST_STATIC_CONSTANT(unsigned,count=(encode_counter
::count)); } __if_not_exists(the_counter
) { __if_exists(the_counter
) { BOOST_STATIC_CONSTANT(unsigned,count=(encode_counter
::count)); } __if_not_exists(the_counter
) { BOOST_STATIC_CONSTANT(unsigned,count=N); typedef the_counter
type; } } } } } }; # define BOOST_TYPEOF_INDEX(T) (encode_counter
::count) # define BOOST_TYPEOF_NEXT_INDEX(next) # else template
struct encode_counter : encode_counter
{}; template<> struct encode_counter<0> {}; //Need to default to a larger value than 4, as due to MSVC's ETI errors. (sizeof(int)==4) char (*encode_index(...))[5]; # define BOOST_TYPEOF_INDEX(T) (sizeof(*boost::type_of::encode_index((boost::type_of::encode_counter<1005>*)0))) # define BOOST_TYPEOF_NEXT_INDEX(next) friend char (*encode_index(encode_counter
*))[next]; # endif //Typeof code # if BOOST_WORKAROUND(BOOST_MSVC,==1300) template
struct msvc_extract_type { template
struct id2type_impl; typedef id2type_impl
id2type; }; template
struct msvc_register_type : msvc_extract_type
{ template<> struct id2type_impl
//VC7.0 specific bugfeature { typedef T type; }; }; #elif BOOST_WORKAROUND(BOOST_MSVC,>=1400) struct msvc_extract_type_default_param {}; template
struct msvc_extract_type; template
struct msvc_extract_type
{ template
struct id2type_impl; typedef id2type_impl
id2type; }; template
struct msvc_extract_type : msvc_extract_type
{ template<> struct id2type_impl
//VC8.0 specific bugfeature { typedef T type; }; template
struct id2type_impl; typedef id2type_impl
id2type; }; template
struct msvc_register_type : msvc_extract_type
{ }; # else template
struct msvc_extract_type { struct id2type; }; template
struct msvc_register_type : msvc_extract_type
{ typedef msvc_extract_type
base_type; struct base_type::id2type // This uses nice VC6.5 and VC7.1 bugfeature { typedef T type; }; }; # endif # if BOOST_WORKAROUND(BOOST_MSVC,==1310) template
struct msvc_typeid_wrapper { typedef typename msvc_extract_type
::id2type id2type; typedef typename id2type::type wrapped_type; typedef typename wrapped_type::type type; }; //This class is used for registering the type T. encode_type
is mapped against typeid(encode_type
). //msvc_typeid_wrapper
)> will now have a type typedef that equals encode_type
. template
struct encode_type { typedef encode_type
input_type; //Invoke registration of encode_type
. typeid(encode_type
) is now mapped to encode_type
. Do not use registered_type for anything. //The reason for registering encode_type
rather than T, is that VC handles typeid(function reference) poorly. By adding another //level of indirection, we solve this problem. typedef typename msvc_register_type
>::id2type registered_type; typedef T type; }; template
typename disable_if< typename is_function
::type, typename encode_type
::input_type>::type encode_start(T const&); template
typename enable_if< typename is_function
::type, typename encode_type
::input_type>::type encode_start(T&); template
msvc_register_type
typeof_register_type(const T&); # define BOOST_TYPEOF(expr) \ boost::type_of::msvc_typeid_wrapper
::type # define BOOST_TYPEOF_TPL(expr) typename BOOST_TYPEOF(expr) # define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) \ struct name {\ enum {_typeof_register_value=sizeof(typeid(boost::type_of::typeof_register_type
(expr)))};\ typedef typename boost::type_of::msvc_extract_type
::id2type id2type;\ typedef typename id2type::type type;\ }; # define BOOST_TYPEOF_NESTED_TYPEDEF(name,expr) \ struct name {\ enum {_typeof_register_value=sizeof(typeid(boost::type_of::typeof_register_type
(expr)))};\ typedef boost::type_of::msvc_extract_type
::id2type id2type;\ typedef id2type::type type;\ }; # else template
struct msvc_typeid_wrapper { typedef typename msvc_extract_type
>::id2type id2type; typedef typename id2type::type type; }; //Workaround for ETI-bug for VC6 and VC7 template<> struct msvc_typeid_wrapper<1> { typedef msvc_typeid_wrapper<1> type; }; //Workaround for ETI-bug for VC7.1 template<> struct msvc_typeid_wrapper<4> { typedef msvc_typeid_wrapper<4> type; }; //Tie it all together template
struct encode_type { //Get the next available compile time constants index BOOST_STATIC_CONSTANT(unsigned,value=BOOST_TYPEOF_INDEX(T)); //Instantiate the template typedef typename msvc_register_type
>::id2type type; //Set the next compile time constants index BOOST_STATIC_CONSTANT(unsigned,next=value+1); //Increment the compile time constant (only needed when extensions are not active BOOST_TYPEOF_NEXT_INDEX(next); }; template
struct sizer { typedef char(*type)[encode_type
::value]; }; # if BOOST_WORKAROUND(BOOST_MSVC,>=1310) template
typename disable_if< typename is_function
::type, typename sizer
::type>::type encode_start(T const&); template
typename enable_if< typename is_function
::type, typename sizer
::type>::type encode_start(T&); # else template
typename sizer
::type encode_start(T const&); # endif template
msvc_register_type
typeof_register_type(const T&,Organizer* =0); # define BOOST_TYPEOF(expr) \ boost::type_of::msvc_typeid_wrapper
::type # define BOOST_TYPEOF_TPL(expr) typename BOOST_TYPEOF(expr) # define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) \ struct name {\ BOOST_STATIC_CONSTANT(int,_typeof_register_value=sizeof(boost::type_of::typeof_register_type
(expr)));\ typedef typename boost::type_of::msvc_extract_type
::id2type id2type;\ typedef typename id2type::type type;\ }; # define BOOST_TYPEOF_NESTED_TYPEDEF(name,expr) \ struct name {\ BOOST_STATIC_CONSTANT(int,_typeof_register_value=sizeof(boost::type_of::typeof_register_type
(expr)));\ typedef boost::type_of::msvc_extract_type
::id2type id2type;\ typedef id2type::type type;\ }; #endif } } #endif//BOOST_TYPEOF_MSVC_TYPEOF_IMPL_HPP_INCLUDED
typeof_impl.hpp
Page URL
File URL
Prev 1/1 Next
Download
( 10 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.