From b814d80a232f059140f62f13e3795e04037a0197 Mon Sep 17 00:00:00 2001 From: Michael Hoffmann Date: Thu, 17 Jan 2002 15:06:39 +0000 Subject: [PATCH] Added copy constructors/assignment for iterators on gcc-2. --- Packages/STL_Extension/include/CGAL/In_place_list.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Packages/STL_Extension/include/CGAL/In_place_list.h b/Packages/STL_Extension/include/CGAL/In_place_list.h index 3917bb832d8..46dd2af65ea 100644 --- a/Packages/STL_Extension/include/CGAL/In_place_list.h +++ b/Packages/STL_Extension/include/CGAL/In_place_list.h @@ -94,6 +94,12 @@ namespace CGALi { In_place_list_iterator() : node(0) {} In_place_list_iterator(T* x) : node(x) {} +#if defined(__GNUC__) && (__GNUC__ < 3) + // added by request of Michael Seel: + In_place_list_iterator(const Self& i) { node=i.node; } + Self& operator=(const Self& i) { node = i.node; return *this; } +#endif + bool operator==( const Self& x) const { return node == x.node; } bool operator!=( const Self& x) const { return node != x.node; } T& operator*() const { return *node; } @@ -145,6 +151,12 @@ namespace CGALi { In_place_list_const_iterator( Iterator i) : node(&*i) {} In_place_list_const_iterator(const T* x) : node(x) {} +#if defined(__GNUC__) && (__GNUC__ < 3) + // added by request of Michael Seel: + In_place_list_const_iterator(const Self& i) { node=i.node; } + Self& operator=(const Self& i) { node = i.node; return *this; } +#endif + bool operator==( const Self& x) const { return node == x.node; } bool operator!=( const Self& x) const { return node != x.node; } const T& operator*() const { return *node; }