OSDN Git Service

2000-11-17 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 17 Nov 2000 22:58:19 +0000 (22:58 +0000)
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 17 Nov 2000 22:58:19 +0000 (22:58 +0000)
* include/bits/stl_tree.h: Overload operators == and != to be able
to handle the case (const_iterator,iterator) and
(iterator,const_iterator), thus fixing libstdc++/737 and the like.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37531 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_tree.h

index 71197d4..af4c697 100644 (file)
@@ -1,3 +1,9 @@
+2000-11-17  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
+
+       * include/bits/stl_tree.h: Overload operators == and != to be able
+       to handle the case (const_iterator,iterator) and
+       (iterator,const_iterator), thus fixing libstdc++/737 and the like.
+
 2000-11-17  Loren J. Rittle  <ljrittle@acm.org>
 
        * acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Correct last patch
@@ -52,7 +58,7 @@
 
        * config/c_io_stdio.h: Include libio.h.
 
-Wed Nov 15 18:39:34 2000  Mark P Mitchell  <mark@codesourcery.com>
+2000-11-15  Mark P Mitchell  <mark@codesourcery.com>
 
        * acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Substitute libio_la.
        * src/Makefile.am (libstdc___la_LIBADD): Use it.
index 1c78fd2..f82f21c 100644 (file)
@@ -190,12 +190,36 @@ inline bool operator==(const _Rb_tree_iterator<_Value, _Ref, _Ptr>& __x,
   return __x._M_node == __y._M_node;
 }
 
+template <class _Value>
+inline bool operator==(const _Rb_tree_iterator<_Value, const _Value&, const _Value*>& __x,
+                      const _Rb_tree_iterator<_Value, _Value&, _Value*>& __y) {
+  return __x._M_node == __y._M_node;
+}
+
+template <class _Value>
+inline bool operator==(const _Rb_tree_iterator<_Value, _Value&, _Value*>& __x,
+                      const _Rb_tree_iterator<_Value, const _Value&, const _Value*>& __y) {
+  return __x._M_node == __y._M_node;
+}
+
 template <class _Value, class _Ref, class _Ptr>
 inline bool operator!=(const _Rb_tree_iterator<_Value, _Ref, _Ptr>& __x,
                       const _Rb_tree_iterator<_Value, _Ref, _Ptr>& __y) {
   return __x._M_node != __y._M_node;
 }
 
+template <class _Value>
+inline bool operator!=(const _Rb_tree_iterator<_Value, const _Value&, const _Value*>& __x,
+                      const _Rb_tree_iterator<_Value, _Value&, _Value*>& __y) {
+  return __x._M_node != __y._M_node;
+}
+
+template <class _Value>
+inline bool operator!=(const _Rb_tree_iterator<_Value, _Value&, _Value*>& __x,
+                      const _Rb_tree_iterator<_Value, const _Value&, const _Value*>& __y) {
+  return __x._M_node != __y._M_node;
+}
+
 #ifndef __STL_CLASS_PARTIAL_SPECIALIZATION
 
 inline bidirectional_iterator_tag