From d83a5365d16cff4be7da7d9a34eef14b24cc8733 Mon Sep 17 00:00:00 2001 From: Sandy Zhang Date: Thu, 24 Oct 2024 16:33:54 -0700 Subject: [PATCH] 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 --- src/google/protobuf/arena.h | 13 ------------- src/google/protobuf/port_def.inc | 4 ---- 2 files changed, 17 deletions(-) diff --git a/src/google/protobuf/arena.h b/src/google/protobuf/arena.h index 545fd5126a478..124c0c682a550 100644 --- a/src/google/protobuf/arena.h +++ b/src/google/protobuf/arena.h @@ -197,19 +197,6 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final { inline ~Arena() = default; -#ifndef PROTOBUF_FUTURE_REMOVE_CREATEMESSAGE - // Deprecated. Use Create instead. - template - ABSL_DEPRECATED("Use Create") - static T* CreateMessage(Arena* arena, Args&&... args) { - using Type = std::remove_const_t; - static_assert( - is_arena_constructable::value, - "CreateMessage can only construct types that are ArenaConstructable"); - return Create(arena, std::forward(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 diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc index 1b985643327de..19c4c97729552 100644 --- a/src/google/protobuf/port_def.inc +++ b/src/google/protobuf/port_def.inc @@ -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