3 ms·
Might in some cases be OK, but it is also how you get "general protection fault" and rampant uncaught exceptions in some earlier versions of Windows.
by jnxx 5y ago
Might in some cases be OK, but it is also how you get "general protection fault" and rampant uncaught exceptions in some earlier versions of Windows.
- asdfasgasdgasdg 5y agoIn 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/...