diff --git a/src/google/protobuf/reflection.h b/src/google/protobuf/reflection.h index af8eb00ef84caa6f4022a8699e8207eab60effb4..8edcdb56b1c8c64fa9c6aa99d4318a0b0fa58ee3 100644 --- a/src/google/protobuf/reflection.h +++ b/src/google/protobuf/reflection.h @@ -392,13 +392,19 @@ class PROTOBUF_EXPORT RepeatedFieldAccessor { // Implement (Mutable)RepeatedFieldRef::iterator template -class RepeatedFieldRefIterator - : public std::iterator { +class RepeatedFieldRefIterator { + // : public std::iterator { typedef typename RefTypeTraits::AccessorValueType AccessorValueType; typedef typename RefTypeTraits::IteratorValueType IteratorValueType; typedef typename RefTypeTraits::IteratorPointerType IteratorPointerType; public: + using iterator_category = std::forward_iterator_tag; + using value_type = T; + using pointer = T*; + using reference = T&; + using difference_type = std::ptrdiff_t; + // Constructor for non-message fields. RepeatedFieldRefIterator(const void* data, const RepeatedFieldAccessor* accessor, bool begin)