Document StringViewLiteral equality members
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -32,13 +32,17 @@ namespace ArbUt {
|
||||
/// @return A normal StringView.
|
||||
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 {
|
||||
return _hash == Hash(rhs.data());
|
||||
}
|
||||
/// @brief Check inequality with standard C++ string.
|
||||
inline constexpr bool operator!=(const std::string_view& rhs) const noexcept final {
|
||||
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); }
|
||||
/// @brief Check inequality with standard C style string.
|
||||
inline constexpr bool operator!=(const char* non_null rhs) const noexcept final { return _hash != Hash(rhs); }
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user