On Thursday, February 4, 2016 at 3:07:40 AM UTC+5:30, Dan Karp wrote: > > The protobuf3 language guide says > > If you want to create an associative map as part of your data definition, > protocol buffers provides a handy shortcut syntax: > > map<key_type, value_type> map_field = N; > > ...where the key_type can be any integral or string type (so, any scalar > <https://developers.google.com/protocol-buffers/docs/proto3?hl=en#scalar> > type > except for floating point types and bytes). The value_type can be any > type. > > > Why aren't enums allowed as map keys? Defining an enum already requires > that we provide a mapping from each enum value to a unique int. >
Did you find the answer? -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
