Re:Type-safe Bitmasks in C++
by dokem on Wednesday June 13, 2018 @04:24PM
(#17306621)
I think you are missing my points. This language feature cannot be used to eg, create a TCP header. It has nothing to do with the C++ ABI. And no, bit packing is not for memory saving, eg MISRA disallows bitpacking for the purpose of space saving.
The network wire doesn't need a C++ ABI-compatible object, and clearly isn't portable when communicating between systems running different software.
For transmitting data over network, convert from local format to network format in transit.
> can only be used to save a bytes of memory
Yes, that's what "packing" is for.