x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
default_deleter.hpp - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\boost_1_35_0\boost\ptr_container\detail\default_deleter.hpp
旋转
特效
属性
历史版本
// (C) Copyright Jonathan Turkanis 2004-2005. // 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.) // Contains the definition of move_ptrs::default_deleter, the default // Deleter template argument to move_ptr. Uses a technique of Daniel // Wallin to capture the type of a pointer at the time the deleter // is constructed, so that move_ptrs can delete objects of incomplete // type by default. #ifndef BOOST_MOVE_PTR_DEFAULT_DELETER_HPP_INCLUDED #define BOOST_MOVE_PTR_DEFAULT_DELETER_HPP_INCLUDED #include
#include
#include
#include
namespace boost { namespace ptr_container_detail { namespace move_ptrs { namespace ptr_container_detail { template
struct deleter_base { typedef void (*deleter)(T*); deleter_base(deleter d) { delete_ = d; } void operator() (T* t) const { delete_(t); } static deleter delete_; }; template
typename deleter_base
::deleter deleter_base
::delete_; template
struct scalar_deleter : deleter_base
{ typedef deleter_base
base; scalar_deleter() : base(do_delete) { } static void do_delete(T* t) { checked_delete(t); } }; template
struct array_deleter : deleter_base
::type> { typedef typename remove_bounds
::type element_type; typedef deleter_base
base; array_deleter() : base(do_delete) { } static void do_delete(element_type* t) { checked_array_delete(t); } }; } // End namespace ptr_container_detail. template
struct default_deleter : mpl::if_< is_array
, ptr_container_detail::array_deleter
, ptr_container_detail::scalar_deleter
>::type { default_deleter() { } template
default_deleter(default_deleter
tt) { } }; } } } // End namespaces ptr_container_detail, move_ptrs, boost. #endif // #ifndef BOOST_MOVE_PTR_DEFAULT_DELETER_HPP_INCLUDED
default_deleter.hpp
网页地址
文件地址
上一页
2/13
下一页
下载
( 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.