Document StringViewLiteral equality members
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
a618f2b98b
commit
47272b0206
|
@ -32,13 +32,17 @@ namespace ArbUt {
|
||||||
/// @return A normal StringView.
|
/// @return A normal StringView.
|
||||||
inline operator StringView() const noexcept { return StringView(*this, _str, _length); }
|
inline operator StringView() const noexcept { return StringView(*this, _str, _length); }
|
||||||
|
|
||||||
|
/// @brief Check equality with standard C++ string.
|
||||||
inline constexpr bool operator==(const std::string_view& rhs) const noexcept final {
|
inline constexpr bool operator==(const std::string_view& rhs) const noexcept final {
|
||||||
return _hash == Hash(rhs.data());
|
return _hash == Hash(rhs.data());
|
||||||
}
|
}
|
||||||
|
/// @brief Check inequality with standard C++ string.
|
||||||
inline constexpr bool operator!=(const std::string_view& rhs) const noexcept final {
|
inline constexpr bool operator!=(const std::string_view& rhs) const noexcept final {
|
||||||
return _hash != Hash(rhs.data());
|
return _hash != Hash(rhs.data());
|
||||||
}
|
}
|
||||||
|
/// @brief Check equality with standard C style string.
|
||||||
inline constexpr bool operator==(const char* non_null rhs) const noexcept final { return _hash == Hash(rhs); }
|
inline constexpr bool operator==(const char* non_null rhs) const noexcept final { return _hash == Hash(rhs); }
|
||||||
|
/// @brief Check inequality with standard C style string.
|
||||||
inline constexpr bool operator!=(const char* non_null rhs) const noexcept final { return _hash != Hash(rhs); }
|
inline constexpr bool operator!=(const char* non_null rhs) const noexcept final { return _hash != Hash(rhs); }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue