diff --git a/src/String/StringViewLiteral.hpp b/src/String/StringViewLiteral.hpp index e227c62..8c75760 100644 --- a/src/String/StringViewLiteral.hpp +++ b/src/String/StringViewLiteral.hpp @@ -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); } }; }