Workaround an issue with some compilers and static analysis tools where they
complain that the type is incomplete even without instantiating the template.

We still get the proper error on invalid instantiations while not having the
issue on the main declaration.

PiperOrigin-RevId: 859692749
diff --git a/src/google/protobuf/message_lite.h b/src/google/protobuf/message_lite.h
index 710ce67..acfdfb4 100644
--- a/src/google/protobuf/message_lite.h
+++ b/src/google/protobuf/message_lite.h
@@ -299,8 +299,12 @@
 
 struct EnumTraitsImpl {
   struct Undefined;
+  // We use an incomplete type to cause a compiler error if something tries to
+  // instantiate `value<T>` with a `T` that had no specialization.
+  // The `enable_if` is there to workaround some compilers/tools that complain
+  // on the declaration even with no instantiations.
   template <typename T>
-  static Undefined value;
+  static std::enable_if_t<sizeof(T) != 0, Undefined> value;
 };
 template <typename T>
 using EnumTraits = decltype(EnumTraitsImpl::value<T>);