|
|
template<typename T, typename U> |
| MSTL_NODISCARD bool | operator== (const shared_ptr< T > &lhs, const shared_ptr< U > &rhs) noexcept |
| | 相等比较运算符
|
|
template<typename T, typename U> |
| MSTL_NODISCARD bool | operator!= (const shared_ptr< T > &lhs, const shared_ptr< U > &rhs) noexcept |
| | 不等比较运算符
|
|
template<typename T, typename U> |
| MSTL_NODISCARD bool | operator< (const shared_ptr< T > &lhs, const shared_ptr< U > &rhs) noexcept |
| | 小于比较运算符(基于所有权顺序)
|
|
template<typename T, typename U> |
| MSTL_NODISCARD bool | operator> (const shared_ptr< T > &lhs, const shared_ptr< U > &rhs) noexcept |
| | 大于比较运算符
|
|
template<typename T, typename U> |
| MSTL_NODISCARD bool | operator<= (const shared_ptr< T > &lhs, const shared_ptr< U > &rhs) noexcept |
| | 小于等于比较运算符
|
|
template<typename T, typename U> |
| MSTL_NODISCARD bool | operator>= (const shared_ptr< T > &lhs, const shared_ptr< U > &rhs) noexcept |
| | 大于等于比较运算符
|
| template<typename T, typename... Args> |
| enable_if_t<!is_unbounded_array_v< T > &&is_constructible_v< T, Args... >, shared_ptr< T > > | make_shared (Args &&... args) |
| | 融合分配创建共享指针
|
| template<typename T> |
| enable_if_t< is_unbounded_array_v< T >, shared_ptr< T > > | make_shared (const size_t len) |
| | 创建动态数组的共享指针
|
| template<typename T, typename Alloc, typename... Args> |
| enable_if_t<!is_array_v< T > &&is_constructible_v< T, Args... >, shared_ptr< T > > | allocate_shared (Alloc &alloc, Args &&... args) |
| | 使用分配器创建共享指针
|
| template<typename T, typename U> |
| shared_ptr< T > | static_pointer_cast (const shared_ptr< U > &ptr) |
| | 静态类型转换
|
| template<typename T, typename U> |
| shared_ptr< T > | const_pointer_cast (const shared_ptr< U > &ptr) |
| | CV类型转换
|
| template<typename T, typename U> |
| shared_ptr< T > | reinterpret_pointer_cast (const shared_ptr< U > &ptr) |
| | 重解释类型转换
|
| template<typename T, typename U> |
| shared_ptr< T > | dynamic_pointer_cast (const shared_ptr< U > &ptr) |
| | 动态类型转换
|