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
// (C) Copyright Jeremy Siek 2001. // 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) // Revision History: // 04 Oct 2001 David Abrahams // Changed name of "bind" to "select" to avoid problems with MSVC. #ifndef BOOST_DETAIL_NAMED_TEMPLATE_PARAMS_HPP #define BOOST_DETAIL_NAMED_TEMPLATE_PARAMS_HPP #include
#include
// for is_reference #if defined(__BORLANDC__) #include
#endif namespace boost { namespace detail { struct default_argument { }; struct dummy_default_gen { template
struct select { typedef default_argument type; }; }; // This class template is a workaround for MSVC. template
struct default_generator { typedef detail::dummy_default_gen type; }; template
struct is_default { enum { value = false }; typedef type_traits::no_type type; }; template <> struct is_default
{ enum { value = true }; typedef type_traits::yes_type type; }; struct choose_default { template
struct select { typedef typename default_generator
::type Gen; typedef typename Gen::template select
::type type; }; }; struct choose_arg { template
struct select { typedef Arg type; }; }; #if defined(__BORLANDC__) template
struct choose_arg_or_default { typedef choose_arg type; }; template <> struct choose_arg_or_default
{ typedef choose_default type; }; #else template
struct choose_arg_or_default { typedef choose_arg type; }; template <> struct choose_arg_or_default
{ typedef choose_default type; }; #endif template
class resolve_default { #if defined(__BORLANDC__) typedef typename choose_arg_or_default
::type>::type Selector; #else // This usually works for Borland, but I'm seeing weird errors in // iterator_adaptor_test.cpp when using this method. enum { is_def = is_default
::value }; typedef typename choose_arg_or_default
::type Selector; #endif public: typedef typename Selector ::template select
::type type; }; // To differentiate an unnamed parameter from a traits generator // we use is_convertible
. struct named_template_param_base { }; template
struct is_named_param_list { enum { value = is_convertible
::value }; }; struct choose_named_params { template
struct select { typedef Prev type; }; }; struct choose_default_arg { template
struct select { typedef detail::default_argument type; }; }; template
struct choose_default_dispatch_; template <> struct choose_default_dispatch_
{ typedef choose_named_params type; }; template <> struct choose_default_dispatch_
{ typedef choose_default_arg type; }; // The use of inheritance here is a Solaris Forte 6 workaround. template
struct choose_default_dispatch : public choose_default_dispatch_
{ }; template
struct choose_default_argument { enum { is_named = is_named_param_list
::value }; typedef typename choose_default_dispatch
::type Selector; typedef typename Selector::template select
::type type; }; // This macro assumes that there is a class named default_##TYPE // defined before the application of the macro. This class should // have a single member class template named "select" with two // template parameters: the type of the class being created (e.g., // the iterator_adaptor type when creating iterator adaptors) and // a traits class. The select class should have a single typedef // named "type" that produces the default for TYPE. See // boost/iterator_adaptors.hpp for an example usage. Also, // applications of this macro must be placed in namespace // boost::detail. #define BOOST_NAMED_TEMPLATE_PARAM(TYPE) \ struct get_##TYPE##_from_named { \ template
\ struct select { \ typedef typename NamedParams::traits NamedTraits; \ typedef typename NamedTraits::TYPE TYPE; \ typedef typename resolve_default
::type type; \ }; \ }; \ struct pass_thru_##TYPE { \ template
struct select { \ typedef typename resolve_default
::type type; \ };\ }; \ template
\ struct get_##TYPE##_dispatch { }; \ template <> struct get_##TYPE##_dispatch<1> { \ typedef get_##TYPE##_from_named type; \ }; \ template <> struct get_##TYPE##_dispatch<0> { \ typedef pass_thru_##TYPE type; \ }; \ template
\ class get_##TYPE { \ enum { is_named = is_named_param_list
::value }; \ typedef typename get_##TYPE##_dispatch
::type Selector; \ public: \ typedef typename Selector::template select
::type type; \ }; \ template <> struct default_generator
{ \ typedef default_##TYPE type; \ } } // namespace detail } // namespace boost #endif // BOOST_DETAIL_NAMED_TEMPLATE_PARAMS_HPP
named_template_params.hpp
Page URL
File URL
Prev
32/61
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.