Comment #6 on issue 179 by [email protected]: Visual C++ error C1091 when compiling protoc generated code with over 64k descriptor
http://code.google.com/p/protobuf/issues/detail?id=179

Valera,

"static std::string s(oss.str());\n" is not an elegant solution at all. I did a similar hack with just std::string :
std::string s;
s += "bla-bla-bla".

The problem with this approach is that std::string parses literal string till '\0' symbol. And, yes, literal string can have '\0' symbols in the middle.

For instance, if .proto definition has an enumeration with elements equals to 0 it will be presented by protobuf as '\0' element in proto definition string.

A bit more elegant solution based on std::vector<char> is attached.

Attachments:
        cpp_file.cc  22.5 KB

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
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 http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to