`ByteString`: Adjust bitfields for MSVC · Pull Request #1446 · google/cel-cpp
Microsoft Visual C++ compiler has more restrictions than usual about bit fields. There are two restrictions that particularly break ByteString: - A consecutive field with a different type will force alignment to next boundary - The alignment boundary is based on the type of the bitfield Because of this, we can't use the enumeration type inside of the bitfield. Actually though, this is mostly OK: the header struct is the only one that actually needs a typed enum, and nothing follows it in the header struct. Therefore, this workaround should make all of GCC, Clang and MSVC happy. Also: fixes the #pragma pack directives, which are typo'd slightly.