diff options
Diffstat (limited to 'src/google/protobuf/map_field_lite.h')
-rw-r--r-- | src/google/protobuf/map_field_lite.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/google/protobuf/map_field_lite.h b/src/google/protobuf/map_field_lite.h index 12d4e6ba..f648b430 100644 --- a/src/google/protobuf/map_field_lite.h +++ b/src/google/protobuf/map_field_lite.h @@ -121,6 +121,21 @@ bool AllAreInitialized(const Map<Key, T>& t) { return true; } +template <typename MEntry> +struct MapEntryToMapField : MapEntryToMapField<typename MEntry::SuperType> {}; + +template <typename T, typename Key, typename Value, + WireFormatLite::FieldType kKeyFieldType, + WireFormatLite::FieldType kValueFieldType, int default_enum_value> +struct MapEntryToMapField<MapEntryLite<T, Key, Value, kKeyFieldType, + kValueFieldType, default_enum_value> > { + typedef MapFieldLite<MapEntryLite<T, Key, Value, kKeyFieldType, + kValueFieldType, default_enum_value>, + Key, Value, kKeyFieldType, kValueFieldType, + default_enum_value> + MapFieldType; +}; + } // namespace internal } // namespace protobuf |