From cfde776724c2f214b962dc8077ddca8305ddd705 Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Thu, 17 Apr 2008 21:46:22 +0000 Subject: Patch for improved compatibility with gcc 3.4 and boost 1.33 git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@649294 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/ISList.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'cpp/src/qpid/ISList.h') diff --git a/cpp/src/qpid/ISList.h b/cpp/src/qpid/ISList.h index 96ba3ec726..b0004c9561 100644 --- a/cpp/src/qpid/ISList.h +++ b/cpp/src/qpid/ISList.h @@ -49,13 +49,15 @@ template class ISListNode { typedef Pointer pointer; typedef typename Pointee::type NodeType; typedef typename pointer_to_other::type const_pointer; + + pointer getNext() { return next; } + pointer * getNextPtr() { return & next; } + const_pointer getNext() const { return next; } protected: ISListNode() : next() {} ISListNode(const ISListNode&) {} // Don't copy the next pointer. - pointer getNext() { return next; } - const_pointer getNext() const { return next; } private: pointer next; @@ -151,6 +153,7 @@ template class ISList : private boost::noncopyable { operator pointer() { return *pptr; } operator const_pointer() const { return *pptr; } + pointer* pptr; private: friend class boost::iterator_core_access; @@ -158,10 +161,9 @@ template class ISList : private boost::noncopyable { Iterator(const pointer* pp) : pptr(const_cast(pp)) {}; T& dereference() const { return **pptr; } - void increment() { pptr = &(**pptr).next; } + void increment() { pptr = (**pptr).getNextPtr(); } bool equal(const Iterator& x) const { return pptr == x.pptr; } - pointer* pptr; friend class ISList; }; -- cgit v1.2.1