键名(字符串字面量)包装器,内部存储着一个
class KwargsKey;| 名称 | 描述 |
|---|---|
KwargsKey |
构造函数。 |
| 名称 | 描述 |
|---|---|
value_type |
字符串哈希值的类型,是一个占 |
| 名称 | 描述 |
|---|---|
value |
获取哈希值。 |
| 名称 | 描述 |
|---|---|
operator value_type() |
可隐式转换为 value_type。 |
operator== |
哈希值比较。 |
operator!= |
哈希值比较。 |
operator< |
哈希值比较。 |
operator> |
哈希值比较。 |
operator<= |
哈希值比较。 |
operator>= |
哈希值比较。 |
operator|| |
连接两个或以上的 KwargsKey。 |
字符串哈希值的类型,是一个占
using value_type = detail::string_hash_type; // std::uint64_t使用字符串字面量构造。
template<std::size_t _Size>
constexpr KwargsKey(const char (&__str)[_Size]) noexcept;使用字符串指针构造。
constexpr KwargsKey(const char* const __str, std::size_t __size) noexcept;Tip
\0 结束符,否则 \0 也将一起参与哈希计算。
直接使用计算后的哈希值进行构造(不推荐使用)。
constexpr explicit KwargsKey(value_type __option) noexcept;获取哈希值。
constexpr value_type value() const noexcept;可隐式转换为 value_type。
constexpr operator value_type() const noexcept;哈希值比较。
constexpr bool operator==(KwargsKey __other) const noexcept;
constexpr bool operator!=(KwargsKey __other) const noexcept;
constexpr bool operator<(KwargsKey __other) const noexcept;
constexpr bool operator>(KwargsKey __other) const noexcept;
constexpr bool operator<=(KwargsKey __other) const noexcept;
constexpr bool operator>=(KwargsKey __other) const noexcept;Warning
哈希算法可能会发生 哈希碰撞,两个不相等的字符串的哈希值在极小概率的情况下也有可能会相同,但是两个相同的字符串的哈希值一定相同。
连接两个或以上的 KwargsKey。
支持使用 or 运算连接两个键,详见 Kwargs。
friend constexpr std::array<KwargsKey, 2>
operator||(KwargsKey __first, KwargsKey __second) noexcept;
template<std::size_t _StringSize>
friend constexpr std::array<KwargsKey, 2>
operator||(KwargsKey __first, const char (&__second)[_StringSize]) noexcept;
template<std::size_t _Size>
friend constexpr std::array<KwargsKey, _Size + 1>
operator||(const std::array<KwargsKey, _Size>& __first, KwargsKey __second) noexcept;
template<std::size_t _Size, std::size_t _StringSize>
friend constexpr std::array<KwargsKey, _Size + 1>
operator||(const std::array<KwargsKey, _Size>& __first, const char (&__second)[_StringSize]) noexcept;