[Glacier] Update String to be non-copyable by default.
This commit is contained in:
parent
ced89834de
commit
337126cabb
10 changed files with 39 additions and 42 deletions
|
|
@ -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_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue