From 86dbd83efc8a80ceaafaec2d7ea5d8e8db2def41 Mon Sep 17 00:00:00 2001 From: dmiller Date: Wed, 17 Jun 2026 17:34:44 +0000 Subject: [PATCH] Avoid g++ warning about std::iterator deprecation --- services.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/services.cc b/services.cc index 3d4e0ce17..296bf6581 100644 --- a/services.cc +++ b/services.cc @@ -339,9 +339,15 @@ static int port_compare(const void *a, const void *b) { template -class C_array_iterator: public std::iterator { +class C_array_iterator { T *ptr; - public: +public: + typedef std::random_access_iterator_tag iterator_category; + typedef T value_type; + typedef std::ptrdiff_t difference_type; + typedef T* pointer; + typedef T& reference; + C_array_iterator(T *_ptr=NULL) : ptr(_ptr) {} C_array_iterator(const C_array_iterator &other) : ptr(other.ptr) {} C_array_iterator& operator=(T *_ptr) {ptr = _ptr; return *this;} @@ -354,7 +360,6 @@ class C_array_iterator: public std::iterator