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

集合器接口模板 更多...

#include <icollector.hpp>

类 icollector< T > 继承关系图:
[图例]

Public 成员函数

MSTL_NODISCARD constexpr decltype(auto) size () const noexcept(noexcept(derived().size()))
 获取集合大小
MSTL_NODISCARD constexpr bool empty () const noexcept(noexcept(derived().empty()))
 检查集合是否为空
Public 成员函数 继承自 icomparable< T >
MSTL_NODISCARD constexpr bool operator== (const T &rhs) const noexcept(noexcept(derived()==rhs))
 相等比较运算符
MSTL_NODISCARD constexpr bool operator!= (const T &rhs) const noexcept(noexcept(!(*this==rhs)))
 不等比较运算符
MSTL_NODISCARD constexpr bool operator< (const T &rhs) const noexcept(noexcept(derived()< rhs))
 小于比较运算符
MSTL_NODISCARD constexpr bool operator> (const T &rhs) const noexcept(noexcept(rhs< derived()))
 大于比较运算符
MSTL_NODISCARD constexpr bool operator<= (const T &rhs) const noexcept(noexcept(!(derived() > rhs)))
 小于等于比较运算符
MSTL_NODISCARD constexpr bool operator>= (const T &rhs) const noexcept(noexcept(!(derived()< rhs)))
 大于等于比较运算符

详细描述

template<typename T>
struct icollector< T >

集合器接口模板

模板参数
T派生类型

为集合类型提供统一的接口,包括大小查询、空检查和哈希计算。

在文件 icollector.hpp29 行定义.

成员函数说明

◆ empty()

template<typename T>
MSTL_NODISCARD constexpr bool icollector< T >::empty ( ) const
inlineconstexprnoexcept

检查集合是否为空

返回
是否为空

在文件 icollector.hpp53 行定义.

◆ size()

template<typename T>
MSTL_NODISCARD constexpr decltype(auto) icollector< T >::size ( ) const
inlineconstexprnoexcept

获取集合大小

返回
集合中元素的数量

在文件 icollector.hpp44 行定义.


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