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

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

#include <icollector.hpp>

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

Public 成员函数

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

详细描述

template<typename T>
struct icollector< T >

集合器接口模板

模板参数
T派生类型

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

TODO: Make icollector replace ranges as the base class for iterable operations

在文件 icollector.hpp30 行定义.

成员函数说明

◆ empty()

template<typename T>
bool icollector< T >::empty ( ) const
inlinenodiscardconstexprnoexcept

检查集合是否为空

返回
是否为空

在文件 icollector.hpp47 行定义.

引用了 empty().

被这些函数引用 empty().

◆ size()

template<typename T>
decltype(auto) icollector< T >::size ( ) const
inlinenodiscardconstexprnoexcept

获取集合大小

返回
集合中元素的数量

在文件 icollector.hpp39 行定义.

引用了 size().

被这些函数引用 size().


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