|
@@ -64,6 +64,9 @@ public:
|
|
|
|
|
|
// Creates a new String from a sequence of UTF-8 encoded code points.
|
|
|
static ErrorOr<String> from_utf8(StringView);
|
|
|
+ template<typename T>
|
|
|
+ requires(IsOneOf<RemoveCVReference<T>, DeprecatedString, DeprecatedFlyString>)
|
|
|
+ static ErrorOr<String> from_utf8(T&&) = delete;
|
|
|
|
|
|
// Creates a new String by reading byte_count bytes from a UTF-8 encoded Stream.
|
|
|
static ErrorOr<String> from_stream(Stream&, size_t byte_count);
|
|
@@ -225,6 +228,9 @@ public:
|
|
|
// FIXME: Remove these once all code has been ported to String
|
|
|
[[nodiscard]] DeprecatedString to_deprecated_string() const;
|
|
|
static ErrorOr<String> from_deprecated_string(DeprecatedString const&);
|
|
|
+ template<typename T>
|
|
|
+ requires(IsSame<RemoveCVReference<T>, StringView>)
|
|
|
+ static ErrorOr<String> from_deprecated_string(T&&) = delete;
|
|
|
|
|
|
private:
|
|
|
// NOTE: If the least significant bit of the pointer is set, this is a short string.
|