diff --git a/src/google/protobuf/port.h b/src/google/protobuf/port.h index 583a70553c840..2b7fcb9b50078 100644 --- a/src/google/protobuf/port.h +++ b/src/google/protobuf/port.h @@ -665,6 +665,14 @@ inline bool IsMemoryPoisoned([[maybe_unused]] const void* p) { #endif } +inline constexpr bool ShouldBatchRepeatedNumeric() { +#ifdef PROTOBUF_INTERNAL_BATCH_REPEATED_NUMERIC + return true; +#else + return false; +#endif +} + #if defined(ABSL_HAVE_THREAD_SANITIZER) // TODO: it would be preferable to use __tsan_external_read/ // __tsan_external_write, but they can cause dlopen issues.