MSTL 1.4.0
A Modern C++ Library with extended functionality, web components, and utility libraries
载入中...
搜索中...
未找到
unique_ptr.hpp 文件参考

MSTL独占智能指针 更多...

unique_ptr.hpp 的引用(Include)关系图:

浏览该文件的源代码.

struct  default_delete< T >
 默认删除器 更多...
struct  default_delete< T[]>
 数组特化的默认删除器 更多...
class  unique_ptr< T, Deleter >
 独占智能指针 更多...
class  unique_ptr< T[], Deleter >
 数组特化的unique_ptr 更多...
struct  hash< unique_ptr< T, Deleter > >
 unique_ptr的哈希特化 更多...

函数

template<typename T, typename Deleter, enable_if_t< is_swappable< Deleter >::value &&is_swappable< T >::value, int > = 0>
void swap (unique_ptr< T, Deleter > &lhs, unique_ptr< T, Deleter > &rhs) noexcept
 交换两个unique_ptr
template<typename T, typename D, typename U, typename E>
MSTL_NODISCARD MSTL_CONSTEXPR20 bool operator== (const unique_ptr< T, D > &lhs, const unique_ptr< U, E > &rhs)
 相等比较运算符
template<typename T, typename D>
MSTL_NODISCARD MSTL_CONSTEXPR20 bool operator== (const unique_ptr< T, D > &lhs, nullptr_t)
 与nullptr的相等比较运算符
template<typename T, typename D>
MSTL_NODISCARD MSTL_CONSTEXPR20 bool operator== (nullptr_t, const unique_ptr< T, D > &rhs)
 nullptr与unique_ptr的相等比较运算符
template<typename T, typename D, typename U, typename E>
MSTL_NODISCARD MSTL_CONSTEXPR20 bool operator!= (const unique_ptr< T, D > &lhs, const unique_ptr< U, E > &rhs)
 不等比较运算符
template<typename T, typename D>
MSTL_NODISCARD MSTL_CONSTEXPR20 bool operator!= (const unique_ptr< T, D > &lhs, nullptr_t)
 与nullptr的不等比较运算符
template<typename T, typename D>
MSTL_NODISCARD MSTL_CONSTEXPR20 bool operator!= (nullptr_t, const unique_ptr< T, D > &rhs)
 nullptr与unique_ptr的不等比较运算符
template<typename T, typename D, typename U, typename E>
MSTL_NODISCARD MSTL_CONSTEXPR20 bool operator< (const unique_ptr< T, D > &lhs, const unique_ptr< U, E > &rhs)
 小于比较运算符
template<typename T, typename D>
MSTL_NODISCARD MSTL_CONSTEXPR20 bool operator< (const unique_ptr< T, D > &lhs, nullptr_t)
 与nullptr的小于比较运算符
template<typename T, typename D>
MSTL_NODISCARD MSTL_CONSTEXPR20 bool operator< (nullptr_t, const unique_ptr< T, D > &rhs)
 nullptr与unique_ptr的小于比较运算符
template<typename T, typename D, typename U, typename E>
MSTL_NODISCARD MSTL_CONSTEXPR20 bool operator> (const unique_ptr< T, D > &lhs, const unique_ptr< U, E > &rhs)
 大于比较运算符
template<typename T, typename D>
MSTL_NODISCARD MSTL_CONSTEXPR20 bool operator> (const unique_ptr< T, D > &lhs, nullptr_t)
 与nullptr的大于比较运算符
template<typename T, typename D>
MSTL_NODISCARD MSTL_CONSTEXPR20 bool operator> (nullptr_t, const unique_ptr< T, D > &rhs)
 nullptr与unique_ptr的大于比较运算符
template<typename T, typename D, typename U, typename E>
MSTL_NODISCARD MSTL_CONSTEXPR20 bool operator<= (const unique_ptr< T, D > &lhs, const unique_ptr< U, E > &rhs)
 小于等于比较运算符
template<typename T, typename D>
MSTL_NODISCARD MSTL_CONSTEXPR20 bool operator<= (const unique_ptr< T, D > &lhs, nullptr_t)
 与nullptr的小于等于比较运算符
template<typename T, typename D>
MSTL_NODISCARD MSTL_CONSTEXPR20 bool operator<= (nullptr_t, const unique_ptr< T, D > &rhs)
 nullptr与unique_ptr的小于等于比较运算符
template<typename T, typename D, typename U, typename E>
MSTL_NODISCARD MSTL_CONSTEXPR20 bool operator>= (const unique_ptr< T, D > &lhs, const unique_ptr< U, E > &rhs)
 大于等于比较运算符
template<typename T, typename D>
MSTL_NODISCARD MSTL_CONSTEXPR20 bool operator>= (const unique_ptr< T, D > &lhs, nullptr_t)
 与nullptr的大于等于比较运算符
template<typename T, typename D>
MSTL_NODISCARD MSTL_CONSTEXPR20 bool operator>= (nullptr_t, const unique_ptr< T, D > &rhs)
 nullptr与unique_ptr的大于等于比较运算符
template<typename T, typename U>
unique_ptr< T > static_pointer_cast (const unique_ptr< U > &ptr)=delete
 禁止的static_pointer_cast
template<typename T, typename U>
unique_ptr< T > const_pointer_cast (const unique_ptr< U > &ptr)=delete
 禁止的const_pointer_cast
template<typename T, typename U>
unique_ptr< T > reinterpret_pointer_cast (const unique_ptr< U > &ptr)=delete
 禁止的reinterpret_pointer_cast
template<typename T, typename U>
unique_ptr< T > dynamic_pointer_cast (const unique_ptr< U > &ptr)=delete
 禁止的dynamic_pointer_cast
template<typename T, typename U>
MSTL_CONSTEXPR20 unique_ptr< T > static_pointer_cast (unique_ptr< U > &&ptr)
 static_pointer_cast
template<typename T, typename U>
MSTL_CONSTEXPR20 unique_ptr< T > const_pointer_cast (unique_ptr< U > &&ptr)
 const_pointer_cast
template<typename T, typename U>
unique_ptr< T > reinterpret_pointer_cast (unique_ptr< U > &&ptr)
 const_pointer_cast
template<typename T, typename U>
unique_ptr< T > dynamic_pointer_cast (unique_ptr< U > &&ptr)
 reinterpret_pointer_cast
template<typename T, typename... Args, enable_if_t<!is_array< T >::value, int > = 0>
MSTL_CONSTEXPR20 unique_ptr< T > make_unique (Args &&... args)
 创建unique_ptr
template<typename T, enable_if_t< is_unbounded_array< T >::value, int > = 0>
MSTL_CONSTEXPR20 unique_ptr< T > make_unique (const size_t len)
 创建unique_ptr
template<typename T, typename... Args, enable_if_t< is_bounded_array< T >::value, int > = 0>
unique_ptr< T > make_unique (Args &&...)=delete
 禁止创建已知边界数组的make_unique

详细描述

MSTL独占智能指针

此文件提供了独占所有权智能指针的实现, 用于管理动态分配对象的生命周期,确保资源的唯一所有权和自动释放。

在文件 unique_ptr.hpp 中定义.