Comment #8 on issue 60 by Support static values in .proto files

I've been wishing for this once in a while.

There's a workaround: Protobuf actually does have a syntax for literal values: field defaults. So you can define:
message Constants {
  optional string constant = 1 [default = "foo"];

and access it as Constants::default_instance().constant();

You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to