diff options
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/vespa/vespalib/util/rcuvector.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vespalib/src/vespa/vespalib/util/rcuvector.h b/vespalib/src/vespa/vespalib/util/rcuvector.h index d2d0a946b91..fd0a7de441a 100644 --- a/vespalib/src/vespa/vespalib/util/rcuvector.h +++ b/vespalib/src/vespa/vespalib/util/rcuvector.h @@ -120,7 +120,6 @@ public: size_t capacity() const { return _data.capacity(); } void clear() { _data.clear(); } T & operator[](size_t i) { return _data[i]; } - const T & operator[](size_t i) const { return _data[i]; } /* * Readers holding a generation guard can call acquire_elem_ref(i) * to get a const reference to element i. Array bound must be handled @@ -128,6 +127,8 @@ public: */ const T& acquire_elem_ref(size_t i) const noexcept { return *(_vector_start.load(std::memory_order_acquire) + i); } + const T& get_elem_ref(size_t i) const noexcept { return _data[i]; } // Called from writer only + void reset(); void shrink(size_t newSize) __attribute__((noinline)); void replaceVector(ArrayType replacement); |