You are right that C++ protos are not POD and therefore might not be a good
fit for your use case. You could try looking at other protobuf
implementations such as UPB and protobuf-c. Since they are written in C I
think they meet the POD requirement.

On Thu, Oct 22, 2020 at 8:56 PM Mario Not64 <[email protected]> wrote:

> Hello,
>
> New to protobuf.  Like to implement it in our existing code base. We
> currently use cereal to serialiaze the data.  We have over 100
> structs/classes send over TCP/IP.  However reading about protobuf I came
> across an issue that I wounder if other have tackled and found a solution
> for.
>
> My understanding of protobuf is you defined your objects in .proto files,
> protobuf generates .h and .cc files (c++ in our case)  creating matching
> classes.  However most of are structs need to be POD (plain old data)
> because they also live in shared memory.  That seems totally incompatible
> with protobuf. That tells me when such struct need to be protobuffed , they
> must be copied into a protobuf version of that struct. That sounds like a
> high maintenancy, high risk proposition.
>
> Suggestion ?
>
> Regards,
> Mario
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/protobuf/de357190-edbb-442b-a952-39cec6a51814n%40googlegroups.com
> <https://groups.google.com/d/msgid/protobuf/de357190-edbb-442b-a952-39cec6a51814n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/CADqAXr7zJEpRtXU0-NU%2B6iPVZcpMvLdXo321%2B0k1uy%2BH3fTd3Q%40mail.gmail.com.

Reply via email to