From 3a80df28dd5352d3125a5531693ea231c9e85d4d Mon Sep 17 00:00:00 2001 From: crs Date: Fri, 31 May 2002 18:35:53 +0000 Subject: [PATCH] changed iterator to use iterator_traits directly instead of std::iterator to support the old STL on grace. --- server/CConfig.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/server/CConfig.h b/server/CConfig.h index 88f58a76..3e9fcd16 100644 --- a/server/CConfig.h +++ b/server/CConfig.h @@ -7,6 +7,18 @@ #include #include +class CConfig; + +namespace std { +struct iterator_traits { + typedef CString value_type; + typedef ptrdiff_t difference_type; + typedef bidirectional_iterator_tag iterator_category; + typedef CString* pointer; + typedef CString& reference; +}; +}; + class CConfig { public: enum EDirection { kLeft, kRight, kTop, kBottom, @@ -22,9 +34,7 @@ private: public: typedef CCellMap::const_iterator internal_const_iterator; - class const_iterator : public std::iterator< - std::bidirectional_iterator_tag, - CString, ptrdiff_t, CString*, CString&> { + class const_iterator : std::iterator_traits { public: explicit const_iterator() : m_i() { } explicit const_iterator(const internal_const_iterator& i) : m_i(i) { }