Relative Content

Tag Archive for c++protocol-buffers

Protobuf 3.0 Any Type pack internals

I know that the Any type is nothing but a byte array (for data) and string field (type url). I would like to know how the packing of byte array in ‘Any’ type takes place. Lets say, I have a protobuf message ‘m1’ in .proto file. in C++ if I :

Protobuf : Use in C++ crash and log is what(): Unknown error -1

google::protobuf::Arena arena; T *proto_ptra = google::protobuf::Arena::CreateMessage<T>(&arena); T b; proto_ptra->Swap(&b); why? run it and what(): Unknown error -1 protobuf can not Swap when using Arena? why? run it and what(): Unknown error -1 protobuf can not Swap when using Arena? c++ protocol-buffers New contributor zhaobo is a new contributor to this site. Take care in asking […]