| Index: src/smart-pointers.h
|
| diff --git a/src/smart-pointers.h b/src/smart-pointers.h
|
| index 345c4d47fb73e8d3e0c10c7f80fc87530876dbb3..fea4595ac71705f3e8a05d6ac58837d926fe60eb 100644
|
| --- a/src/smart-pointers.h
|
| +++ b/src/smart-pointers.h
|
| @@ -63,6 +63,11 @@ class SmartPointerBase {
|
| return p_[i];
|
| }
|
|
|
| + // You can use [n] to index as if it was a plain pointer
|
| + const inline T& operator[](size_t i) const {
|
| + return p_[i];
|
| + }
|
| +
|
| // We don't have implicit conversion to a T* since that hinders migration:
|
| // You would not be able to change a method from returning a T* to
|
| // returning an SmartArrayPointer<T> and then get errors wherever it is used.
|
|
|