NexusForce 1.0.0
A Modern C++ Library with extended functionality, web components, and utility libraries
载入中...
搜索中...
未找到
none.hpp
浏览该文件的文档.
1#ifndef NEFORCE_CORE_UTILITY_NON_HPP__
2#define NEFORCE_CORE_UTILITY_NON_HPP__
3
11
13NEFORCE_BEGIN_NAMESPACE__
14
20
32struct none_t : icommon<none_t> {
38 constexpr none_t() noexcept = default;
39
45 constexpr bool operator==(const none_t& other) const noexcept { return true; }
46
52 constexpr bool operator<(const none_t& other) const noexcept { return false; }
53
58 constexpr size_t to_hash() const noexcept { return constants::FNV_OFFSET_BASIS; }
59
66 constexpr void swap(none_t& other) noexcept {}
67};
68
73NEFORCE_INLINE17 constexpr none_t none{};
74 // Non
76
77NEFORCE_END_NAMESPACE__
78#endif // NEFORCE_CORE_UTILITY_NON_HPP__
NEFORCE_INLINE17 constexpr none_t none
默认空表示
基本接口基类
通用接口,同时具备可比较和可哈希功能
空状态类型
constexpr void swap(none_t &other) noexcept
交换操作
constexpr size_t to_hash() const noexcept
计算哈希值
constexpr bool operator<(const none_t &other) const noexcept
小于比较运算符
constexpr none_t() noexcept=default
默认构造函数