@@ -887,39 +887,6 @@ class PROTOBUF_EXPORT Reflection final {
887887 // Returns nullptr if no extension is known for this name or number.
888888 const FieldDescriptor* FindKnownExtensionByNumber (int number) const ;
889889
890- // Feature Flags -------------------------------------------------------------
891-
892- // Does this message support storing arbitrary integer values in enum fields?
893- // If |true|, GetEnumValue/SetEnumValue and associated repeated-field versions
894- // take arbitrary integer values, and the legacy GetEnum() getter will
895- // dynamically create an EnumValueDescriptor for any integer value without
896- // one. If |false|, setting an unknown enum value via the integer-based
897- // setters results in undefined behavior (in practice, ABSL_DCHECK-fails).
898- //
899- // Generic code that uses reflection to handle messages with enum fields
900- // should check this flag before using the integer-based setter, and either
901- // downgrade to a compatible value or use the UnknownFieldSet if not. For
902- // example:
903- //
904- // int new_value = GetValueFromApplicationLogic();
905- // if (reflection->SupportsUnknownEnumValues()) {
906- // reflection->SetEnumValue(message, field, new_value);
907- // } else {
908- // if (field_descriptor->enum_type()->
909- // FindValueByNumber(new_value) != nullptr) {
910- // reflection->SetEnumValue(message, field, new_value);
911- // } else if (emit_unknown_enum_values) {
912- // reflection->MutableUnknownFields(message)->AddVarint(
913- // field->number(), new_value);
914- // } else {
915- // // convert value to a compatible/default value.
916- // new_value = CompatibleDowngrade(new_value);
917- // reflection->SetEnumValue(message, field, new_value);
918- // }
919- // }
920- ABSL_DEPRECATED (" Use EnumDescriptor::is_closed instead." )
921- bool SupportsUnknownEnumValues () const ;
922-
923890 // Returns the MessageFactory associated with this message. This can be
924891 // useful for determining if a message is a generated message or not, for
925892 // example:
0 commit comments