diff --git a/src/google/protobuf/repeated_ptr_field.h b/src/google/protobuf/repeated_ptr_field.h index 90534e90cf..bb5ed22ea5 100644 --- a/src/google/protobuf/repeated_ptr_field.h +++ b/src/google/protobuf/repeated_ptr_field.h @@ -1183,6 +1183,9 @@ class RepeatedPtrField final : private internal::RepeatedPtrFieldBase { iterator erase(const_iterator first, const_iterator last); // Gets the arena on which this RepeatedPtrField stores its elements. + inline Arena* GetArena(); + + ABSL_DEPRECATED("This will be removed in a future release") inline Arena* GetArena() const; // For internal use only. @@ -1544,6 +1547,11 @@ inline void RepeatedPtrField::SwapElements(int index1, int index2) { RepeatedPtrFieldBase::SwapElements(index1, index2); } +template +inline Arena* RepeatedPtrField::GetArena() { + return RepeatedPtrFieldBase::GetArena(); +} + template inline Arena* RepeatedPtrField::GetArena() const { return RepeatedPtrFieldBase::GetArena();