diff --git a/AK/Utf8View.h b/AK/Utf8View.h index 49382ef1464..a16ae5d88ca 100644 --- a/AK/Utf8View.h +++ b/AK/Utf8View.h @@ -7,11 +7,14 @@ #pragma once -#include #include #include #include +#ifndef KERNEL +# include +#endif + namespace AK { class Utf8View; @@ -61,19 +64,21 @@ public: Utf8View() = default; - explicit Utf8View(DeprecatedString& string) - : m_string(string.view()) - { - } - explicit constexpr Utf8View(StringView string) : m_string(string) { } - ~Utf8View() = default; +#ifndef KERNEL + explicit Utf8View(DeprecatedString& string) + : m_string(string.view()) + { + } explicit Utf8View(DeprecatedString&&) = delete; +#endif + + ~Utf8View() = default; StringView as_string() const { return m_string; } @@ -224,6 +229,7 @@ private: mutable bool m_have_length { false }; }; +#ifndef KERNEL class DeprecatedStringCodePointIterator { public: Optional next() @@ -257,6 +263,7 @@ private: DeprecatedString m_string; Utf8CodePointIterator m_it; }; +#endif template<> struct Formatter : Formatter { @@ -266,7 +273,9 @@ struct Formatter : Formatter { } #if USING_AK_GLOBALLY +# ifndef KERNEL using AK::DeprecatedStringCodePointIterator; +# endif using AK::Utf8CodePointIterator; using AK::Utf8View; #endif