[Glacier] Update String to be non-copyable by default.

This commit is contained in:
Drew Galbraith 2023-11-19 19:14:37 -08:00
parent ced89834de
commit 337126cabb
10 changed files with 39 additions and 42 deletions

View file

@ -13,13 +13,17 @@ class String {
String(const char* cstr, uint64_t str_len);
String(StringView str);
String(const String&) = delete;
const char* cstr() const { return cstr_; }
uint64_t length() const { return length_; }
bool operator==(const String& str);
char operator[](uint64_t offset) const;
operator StringView() const;
StringView view() const;
private:
char* cstr_;