MSTL 1.4.0
A Modern C++ Library with extended functionality, web components, and utility libraries
载入中...
搜索中...
未找到
owner_less< shared_ptr< T > > 模板结构体 参考

共享指针的所有权比较器特化 更多...

#include <weak_ptr.hpp>

Public 类型

using is_transparent = void
 支持透明比较

Public 成员函数

MSTL_NODISCARD bool operator() (const shared_ptr< T > &lhs, const shared_ptr< T > &rhs) const noexcept
 比较两个共享指针的所有权
MSTL_NODISCARD bool operator() (const shared_ptr< T > &lhs, const weak_ptr< T > &rhs) const noexcept
 比较共享指针和弱指针的所有权
MSTL_NODISCARD bool operator() (const weak_ptr< T > &lhs, const shared_ptr< T > &rhs) const noexcept
 比较弱指针和共享指针的所有权

详细描述

template<typename T>
struct owner_less< shared_ptr< T > >

共享指针的所有权比较器特化

模板参数
T共享指针的类型

提供基于控制块地址的智能指针比较,用于关联容器中的排序。

在文件 weak_ptr.hpp310 行定义.


该结构体的文档由以下文件生成: