x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
tagged_argument.hpp - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\boost_1_35_0\boost\parameter\aux_\tagged_argument.hpp
旋转
特效
属性
历史版本
// Copyright Daniel Wallin, David Abrahams 2005. Use, modification and // distribution is subject to 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_PARAMETER_TAGGED_ARGUMENT_050328_HPP # define BOOST_PARAMETER_TAGGED_ARGUMENT_050328_HPP # include
# include
# include
# include
# include
# include
# include
# include
# include
namespace boost { namespace parameter { namespace aux { struct empty_arg_list; struct arg_list_tag; struct tagged_argument_base {}; // Holds a reference to an argument of type Arg associated with // keyword Keyword template
struct tagged_argument : tagged_argument_base { typedef Keyword key_type; typedef Arg value_type; typedef Arg& reference; tagged_argument(reference x) : value(x) {} // A metafunction class that, given a keyword and a default // type, returns the appropriate result type for a keyword // lookup given that default struct binding { template
struct apply { typedef typename mpl::eval_if< boost::is_same
, mpl::if_
, mpl::identity
>::type type; }; }; // Comma operator to compose argument list without using parameters<>. // Useful for argument lists with undetermined length. template
arg_list< tagged_argument
, arg_list
> > operator,(tagged_argument
x) const { return arg_list< tagged_argument
, arg_list
> >( *this , arg_list
>(x, empty_arg_list()) ); } reference operator[](keyword
const&) const { return value; } # if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) template
Default& get_with_default(default_
const& x, int) const { return x.value; } template
reference get_with_default(default_
const&, long) const { return value; } template
typename mpl::apply_wrap3
::type operator[](default_
const& x) const { return get_with_default(x, 0L); } template
typename result_of0
::type get_with_lazy_default(lazy_default
const& x, int) const { return x.compute_default(); } template
reference get_with_lazy_default(lazy_default
const&, long) const { return value; } template
typename mpl::apply_wrap3< binding,KW , typename result_of0
::type , mpl::true_ >::type operator[](lazy_default
const& x) const { return get_with_lazy_default(x, 0L); } # else template
reference operator[](default_
const& x) const { return value; } template
reference operator[](lazy_default
const& x) const { return value; } template
Default& operator[](default_
const& x) const { return x.value; } template
typename result_of0
::type operator[](lazy_default
const& x) const { return x.compute_default(); } template
static typename ParameterRequirements::has_default satisfies(ParameterRequirements*); template
static typename mpl::apply1
::type satisfies( parameter_requirements
* ); # endif reference value; # if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310)) // warning suppression private: void operator=(tagged_argument const&); public: # endif // MPL sequence support typedef tagged_argument type; // Convenience for users typedef empty_arg_list tail_type; // For the benefit of iterators typedef arg_list_tag tag; // For dispatching to sequence intrinsics }; // Defines a metafunction, is_tagged_argument, that identifies // tagged_argument specializations and their derived classes. template
struct is_tagged_argument_aux : is_convertible
{}; template
struct is_tagged_argument : mpl::and_< mpl::not_
> , is_tagged_argument_aux
> {}; }}} // namespace boost::parameter::aux #endif // BOOST_PARAMETER_TAGGED_ARGUMENT_050328_HPP
tagged_argument.hpp
网页地址
文件地址
上一页
11/15
下一页
下载
( 5 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.