Breaking change: remove const GetArena method on RepeatedPtrField

PiperOrigin-RevId: 597349773
pull/15364/head
Mike Kruskal 11 months ago committed by Copybara-Service
parent 1610bf149e
commit 748ab1608a
  1. 4
      src/google/protobuf/port_def.inc
  2. 12
      src/google/protobuf/repeated_ptr_field.h

@ -163,10 +163,6 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3),
// Owner: shaod@, gberg@
#define PROTOBUF_FUTURE_DESCRIPTOR_EXTENSION_DECL 1
// Used to remove `RepeatedPtrField::GetArena() const`.
// Owner: ezb@
#define PROTOBUF_FUTURE_REMOVE_CONST_REPEATEDFIELD_GETARENA_API 1
#endif
// Defines the Protobuf C++ Version for checking version compatibility at

@ -1175,11 +1175,6 @@ class RepeatedPtrField final : private internal::RepeatedPtrFieldBase {
// Gets the arena on which this RepeatedPtrField stores its elements.
inline Arena* GetArena();
#ifndef PROTOBUF_FUTURE_REMOVE_CONST_REPEATEDFIELD_GETARENA_API
ABSL_DEPRECATED("This will be removed in a future release")
inline Arena* GetArena() const;
#endif // !PROTOBUF_FUTURE_REMOVE_CONST_REPEATEDFIELD_GETARENA_API
// For internal use only.
//
// This is public due to it being called by generated code.
@ -1512,13 +1507,6 @@ inline Arena* RepeatedPtrField<Element>::GetArena() {
return RepeatedPtrFieldBase::GetArena();
}
#ifndef PROTOBUF_FUTURE_REMOVE_CONST_REPEATEDFIELD_GETARENA_API
template <typename Element>
inline Arena* RepeatedPtrField<Element>::GetArena() const {
return RepeatedPtrFieldBase::GetArena();
}
#endif // !PROTOBUF_FUTURE_REMOVE_CONST_REPEATEDFIELD_GETARENA_API
template <typename Element>
inline size_t RepeatedPtrField<Element>::SpaceUsedExcludingSelfLong() const {
// `google::protobuf::Message` has a virtual method `SpaceUsedLong`, hence we can

Loading…
Cancel
Save