4 ms·
In the protobuf library, there are some protections against cases like this. For example, they add extra enum values that are explicitly labeled as "do not use"
by asdfasgasdgasdg 5y ago
In the protobuf library, there are some protections against cases like this. For example, they add extra enum values that are explicitly labeled as "do not use" to prevent switch statements from assuming that an enum is complete and future-proof. https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/compiler/cpp/cpp_enum.cc#L131-L134 https://github.com/protocolbuffers/protobuf/blob/master/src/...