Pārlūkot izejas kodu

Merge pull request #5042 from dsnet/master

Document wrapper non-uses
Feng Xiao 7 gadi atpakaļ
vecāks
revīzija
fe2eef4bf4
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  1. 5 0
      src/google/protobuf/wrappers.proto

+ 5 - 0
src/google/protobuf/wrappers.proto

@@ -32,6 +32,11 @@
 // for embedding primitives in the `google.protobuf.Any` type and for places
 // for embedding primitives in the `google.protobuf.Any` type and for places
 // where we need to distinguish between the absence of a primitive
 // where we need to distinguish between the absence of a primitive
 // typed field and its default value.
 // typed field and its default value.
+//
+// These wrappers have no meaningful use within repeated fields as they lack
+// the ability to detect presence on individual elements.
+// These wrappers have no meaningful use within a map or a oneof since individual
+// entries of a map or fields of a oneof can already detect presence.
 
 
 syntax = "proto3";
 syntax = "proto3";