← Back to context

Comment by pjmlp

5 years ago

Interesting, thanks for the clarification, however why do libraries depend on what should be implementation details of generated code to start with?

Something that by good CI/CD practices shouldn't even be part of checked in code.

It's exposed in the API. When you access a string field in protobuf, say foo.my_str_field(), the return type is const std::string&. We have to have a real std::string internally to return a reference to it.