diff --git a/src/CXX/Python3/Objects.hxx b/src/CXX/Python3/Objects.hxx index 09533e3c9b..415a191ac8 100644 --- a/src/CXX/Python3/Objects.hxx +++ b/src/CXX/Python3/Objects.hxx @@ -1442,8 +1442,14 @@ namespace Py } class PYCXX_EXPORT iterator - : public random_access_iterator_parent( seqref ) { + public: + using iterator_category = std::random_access_iterator_tag; + using value_type = seqref; + using difference_type = int; + using pointer = value_type*; + using reference = value_type&; + protected: friend class SeqBase; SeqBase *seq; @@ -1595,8 +1601,14 @@ namespace Py } class PYCXX_EXPORT const_iterator - : public random_access_iterator_parent( const Object ) { + public: + using iterator_category = std::random_access_iterator_tag; + using value_type = const Object; + using difference_type = int; + using pointer = value_type*; + using reference = value_type&; + protected: friend class SeqBase; const SeqBase *seq;