Deprecate repeated field cleared elements API.

This will be removed in a future release.

PiperOrigin-RevId: 503218340
pull/11588/head
Mike Kruskal 2 years ago committed by Copybara-Service
parent 514c9a8e2a
commit 84d8b0037b
  1. 2
      src/google/protobuf/repeated_ptr_field.h

@ -1152,6 +1152,7 @@ class RepeatedPtrField final : private internal::RepeatedPtrFieldBase {
//
// This method cannot be called when either the repeated field or |value| is
// on an arena; both cases will trigger a GOOGLE_ABSL_DCHECK-failure.
ABSL_DEPRECATED("This will be removed in a future release")
void AddCleared(Element* value);
// Removes and returns a single element from the cleared pool, passing
// ownership to the caller. The element is guaranteed to be cleared.
@ -1159,6 +1160,7 @@ class RepeatedPtrField final : private internal::RepeatedPtrFieldBase {
//
// This method cannot be called when the repeated field is on an arena; doing
// so will trigger a GOOGLE_ABSL_DCHECK-failure.
ABSL_DEPRECATED("This will be removed in a future release")
PROTOBUF_NODISCARD Element* ReleaseCleared();
#endif // !PROTOBUF_FUTURE_REMOVE_CLEARED_API

Loading…
Cancel
Save