util/AllocatedString: add operator[]
This commit is contained in:
parent
55be8e6f52
commit
fab5f58ee0
@ -115,6 +115,14 @@ public:
|
||||
return *value == SENTINEL;
|
||||
}
|
||||
|
||||
reference_type operator[](size_type i) {
|
||||
return value[i];
|
||||
}
|
||||
|
||||
const reference_type operator[](size_type i) const {
|
||||
return value[i];
|
||||
}
|
||||
|
||||
pointer_type Steal() {
|
||||
pointer_type result = value;
|
||||
value = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user