From 47272b020654aec7d6c2957b8a8d0ea2b354e4d3 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Wed, 23 Mar 2022 14:20:20 +0100 Subject: [PATCH] Document StringViewLiteral equality members --- src/String/StringViewLiteral.hpp | 4 ++++ 1 file changed, 4 insertions(+) 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); } }; }