File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed
Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -165,6 +165,22 @@ struct Formatter<Utf16FlyString> : Formatter<Utf16String> {
165165 }
166166};
167167
168+ namespace Detail {
169+
170+ template <>
171+ inline constexpr bool IsHashCompatible<Utf16View, Utf16FlyString> = true ;
172+
173+ template <>
174+ inline constexpr bool IsHashCompatible<Utf16FlyString, Utf16View> = true ;
175+
176+ template <>
177+ inline constexpr bool IsHashCompatible<Utf16String, Utf16FlyString> = true ;
178+
179+ template <>
180+ inline constexpr bool IsHashCompatible<Utf16FlyString, Utf16String> = true ;
181+
182+ }
183+
168184}
169185
170186[[nodiscard]] ALWAYS_INLINE AK::Utf16FlyString operator " " _utf16_fly_string(char const * string, size_t length)
Original file line number Diff line number Diff line change 88
99#include < AK/Utf16FlyString.h>
1010
11+ static_assert (AK::Concepts::HashCompatible<Utf16String, Utf16FlyString>);
12+ static_assert (AK::Concepts::HashCompatible<Utf16FlyString, Utf16String>);
13+
14+ static_assert (AK::Concepts::HashCompatible<Utf16View, Utf16FlyString>);
15+ static_assert (AK::Concepts::HashCompatible<Utf16FlyString, Utf16View>);
16+
1117TEST_CASE (empty_string)
1218{
1319 Utf16FlyString fly {};
Original file line number Diff line number Diff line change 1414#include < AK/Utf16String.h>
1515#include < AK/Utf32View.h>
1616
17+ static_assert (AK::Concepts::HashCompatible<Utf16String, Utf16View>);
18+ static_assert (AK::Concepts::HashCompatible<Utf16View, Utf16String>);
19+
1720static Utf16String make_copy (Utf16String const & string)
1821{
1922 return string.has_ascii_storage ()
You can’t perform that action at this time.
0 commit comments