Author: sebor
Date: Mon Jan 16 13:46:40 2006
New Revision: 369576
URL: http://svn.apache.org/viewcvs?rev=369576&view=rev
Log:
2006-01-16 Martin Sebor <[EMAIL PROTECTED]>
STDCXX-120
* deque.cc (erase, _C_assign_n, _C_assign_range, _C_insert_range):
Avoided using operator!= with iterators and used the negated result
of operator== instead, to avoid ambiguity when both namespace std
and namespace rel_ops are in the same scope.
* _tree.cc (erase): Same.
Modified:
incubator/stdcxx/trunk/include/deque.cc
incubator/stdcxx/trunk/include/rw/_tree.cc
Modified: incubator/stdcxx/trunk/include/deque.cc
URL:
http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/include/deque.cc?rev=369576&r1=369575&r2=369576&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/deque.cc (original)
+++ incubator/stdcxx/trunk/include/deque.cc Mon Jan 16 13:46:40 2006
@@ -108,7 +108,7 @@
// `it' must be a dereferenceable iterator into `*this'
_RWSTD_ASSERT_RANGE (begin (), __it);
- _RWSTD_ASSERT (__it != end ());
+ _RWSTD_ASSERT (!(__it == end ()));
_RWSTD_ASSERT (_C_is_valid (0 /* valid and non-empty */));
const iterator __next = ++iterator (__it);
@@ -370,7 +370,7 @@
// avoid using the name __i or __it below so as not to trigger
// a (bogus) gcc 2.95.2 -Wshadow warning: declaration of `__i'
// shadows previous local
- for (iterator __ix = begin (); __ix != __end; ++__ix, --__n) {
+ for (iterator __ix = begin (); !(__ix == __end); ++__ix, --__n) {
if (size_type () == __n) {
erase (__ix, __end);
return;
@@ -507,7 +507,8 @@
// avoid using the name __i or __it below so as not to trigger
// a (bogus) gcc 2.95.2 -Wshadow warning: declaration of `__i'
// shadows previous local
- for (iterator __ix = __self->begin (); __ix != __end; ++__ix, ++__first) {
+ for (iterator __ix = __self->begin (); !(__ix == __end);
+ ++__ix, ++__first) {
if (__first == __last) {
__self->erase (__ix, __end);
return;
@@ -564,7 +565,7 @@
// insert one element at a time to prevent a loss of data
// from the input sequence in the case of an exception
- for ( ; __first != __last; ++__it, ++__first)
+ for ( ; !(__first == __last); ++__it, ++__first)
__it = __self->insert (__it, *__first);
#else // if defined (_RWSTD_NO_EXT_DEQUE_INSERT_IN_PLACE)
Modified: incubator/stdcxx/trunk/include/rw/_tree.cc
URL:
http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/include/rw/_tree.cc?rev=369576&r1=369575&r2=369576&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/rw/_tree.cc (original)
+++ incubator/stdcxx/trunk/include/rw/_tree.cc Mon Jan 16 13:46:40 2006
@@ -2,7 +2,7 @@
*
* _tree.cc - Non-inline tree definitions for the Standard Library
*
- * $Id: //stdlib/dev/include/rw/_tree.cc#22 $
+ * $Id$
*
***************************************************************************
*
@@ -812,7 +812,7 @@
// return end()
__tmp = end ();
} else
- for (__tmp = end (); __first != __last; __tmp = erase (__first++));
+ for (__tmp = end (); !(__first == __last); __tmp = erase (__first++));
return __tmp;
}