x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
maybe.hpp - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\boost_1_35_0\boost\parameter\aux_\maybe.hpp
旋转
特效
属性
历史版本
// Copyright Daniel Wallin 2006. 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_MAYBE_060211_HPP # define BOOST_PARAMETER_MAYBE_060211_HPP # include
# include
# include
# include
# include
# include
# include
# include
namespace boost { namespace parameter { namespace aux { struct maybe_base {}; template
struct maybe : maybe_base { typedef typename add_reference< # if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) T const # else typename add_const
::type # endif >::type reference; typedef typename remove_cv< BOOST_DEDUCED_TYPENAME remove_reference
::type >::type non_cv_value; explicit maybe(T value) : value(value) , constructed(false) {} maybe() : constructed(false) {} ~maybe() { if (constructed) this->destroy(); } reference construct(reference value) const { return value; } template
reference construct2(U const& value) const { new (m_storage.bytes) non_cv_value(value); constructed = true; return *(non_cv_value*)m_storage.bytes; } template
reference construct(U const& value) const { return this->construct2(value); } void destroy() { ((non_cv_value*)m_storage.bytes)->~non_cv_value(); } typedef reference(maybe
::*safe_bool)() const; operator safe_bool() const { return value ? &maybe
::get : 0 ; } reference get() const { return value.get(); } private: boost::optional
value; mutable bool constructed; mutable typename boost::python::detail::referent_storage< reference >::type m_storage; }; }}} // namespace boost::parameter::aux #endif // BOOST_PARAMETER_MAYBE_060211_HPP
maybe.hpp
网页地址
文件地址
上一页
4/15
下一页
下载
( 2 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.