diff options
-rw-r--r-- | libstdc++-v3/ChangeLog | 7 | ||||
-rw-r--r-- | libstdc++-v3/bits/stl_tree.h | 10 |
2 files changed, 13 insertions, 4 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c61d9ef..119f882 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2000-09-07 Brad Garcia <bgarcia@laurelnetworks.com> + + * bits/stl_tree.h: Make operators !=, == type safe for map, set. + * testsuite/23_containers/set_operators.cc: New file. Should not + compile. + * testsuite/23_containers/map_operators.cc: New file. Ditto. + 2000-09-06 Richard Henderson <rth@cygnus.com> Benjamin Kosnik <bkoz@cygnus.com> diff --git a/libstdc++-v3/bits/stl_tree.h b/libstdc++-v3/bits/stl_tree.h index 9ab9daf..1c78fd2 100644 --- a/libstdc++-v3/bits/stl_tree.h +++ b/libstdc++-v3/bits/stl_tree.h @@ -184,13 +184,15 @@ struct _Rb_tree_iterator : public _Rb_tree_base_iterator } }; -inline bool operator==(const _Rb_tree_base_iterator& __x, - const _Rb_tree_base_iterator& __y) { +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; } -inline bool operator!=(const _Rb_tree_base_iterator& __x, - const _Rb_tree_base_iterator& __y) { +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; } |