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

通用接口,同时具备可比较和可哈希功能 更多...

#include <icommon.hpp>

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

额外继承的成员函数

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))))
 大于等于比较运算符
Public 成员函数 继承自 ihashable< T >
constexpr size_t to_ihash () const noexcept(noexcept(derived().to_hash()))
 获取对象的哈希值

详细描述

template<typename T>
struct icommon< T >

通用接口,同时具备可比较和可哈希功能

模板参数
T派生类类型

这是一个便利类,同时继承自icomparable和ihashable, 为派生类提供完整的比较和哈希支持。派生类需实现三个核心方法: equal_to(const T&), less_than(const T&) 和 to_hash()。

在文件 icommon.hpp193 行定义.


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