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