Breaking Change: Remove deprecated Arena::CreateMessage.

These have been marked ABSL_DEPRECATED as of v5.27.x and is replaced with Arena::Create which has been available since v3.0.0.

See https://engdoc.corp.google.com/eng/doc/devguide/proto/news/2024-10-02.md#arenacreatemessage

PiperOrigin-RevId: 689557672
pull/18937/head
Sandy Zhang 4 months ago committed by Copybara-Service
parent 7ef7eebbfc
commit d83a5365d1
  1. 13
      src/google/protobuf/arena.h
  2. 4
      src/google/protobuf/port_def.inc

@ -197,19 +197,6 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final {
inline ~Arena() = default;
#ifndef PROTOBUF_FUTURE_REMOVE_CREATEMESSAGE
// Deprecated. Use Create<T> instead.
template <typename T, typename... Args>
ABSL_DEPRECATED("Use Create")
static T* CreateMessage(Arena* arena, Args&&... args) {
using Type = std::remove_const_t<T>;
static_assert(
is_arena_constructable<Type>::value,
"CreateMessage can only construct types that are ArenaConstructable");
return Create<Type>(arena, std::forward<Args>(args)...);
}
#endif // !PROTOBUF_FUTURE_REMOVE_CREATEMESSAGE
// Allocates an object type T if the arena passed in is not nullptr;
// otherwise, returns a heap-allocated object.
template <typename T, typename... Args>

@ -144,10 +144,6 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3),
// Owner: shaod@, gberg@
#define PROTOBUF_FUTURE_DESCRIPTOR_EXTENSION_DECL 1
// Removes Arena::CreateMessage, as Arena::Create is equivalent
// Owner: ckennelly@, mkruskal@
#define PROTOBUF_FUTURE_REMOVE_CREATEMESSAGE 1
// Renames DescriptorPool::AddUnusedImportTrackFile
// Owner: mkruskal@
#define PROTOBUF_FUTURE_RENAME_ADD_UNUSED_IMPORT 1

Loading…
Cancel
Save