From 73154defa8782c0697868f60fbf9f364cf5dea93 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Wed, 6 Aug 2025 09:11:38 -0400 Subject: [PATCH] AK: Allow implicitly constructing a Utf16View from a Utf16FlyString The same already works for String and FlyString into StringView, and for Utf16String into Utf16View. --- AK/Utf16FlyString.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AK/Utf16FlyString.h b/AK/Utf16FlyString.h index 543696a8544..520be10378f 100644 --- a/AK/Utf16FlyString.h +++ b/AK/Utf16FlyString.h @@ -39,6 +39,9 @@ public: ALWAYS_INLINE explicit operator Utf16String() const { return to_utf16_string(); } + ALWAYS_INLINE operator Utf16View() const& { return view(); } + explicit operator Utf16View() const&& = delete; + ALWAYS_INLINE Utf16String to_utf16_string() const { Detail::Utf16StringBase copy { m_data };