[EMAIL PROTECTED] wrote:
Author: faridz
Date: Sat Mar 15 21:48:29 2008
New Revision: 637539

URL: http://svn.apache.org/viewvc?rev=637539&view=rev
Log:
2008-03-16 Farid Zaripov <[EMAIL PROTECTED]>

        STDCXX-635
        * include/deque (operator-): If one of the iterators is the iterator
        of the empty deque, return difference between _C_cur data members.

Modified:
    stdcxx/trunk/include/deque

Modified: stdcxx/trunk/include/deque
URL: 
http://svn.apache.org/viewvc/stdcxx/trunk/include/deque?rev=637539&r1=637538&r2=637539&view=diff
==============================================================================
--- stdcxx/trunk/include/deque (original)
+++ stdcxx/trunk/include/deque Sat Mar 15 21:48:29 2008
@@ -277,6 +277,13 @@
 operator- (const _RWSTD_DEQUE_ITER(1) &__x, const _RWSTD_DEQUE_ITER(2) &__y)
 {
     // _RWSTD_ASSERT_RANGE (__x, __y);
+    typedef _TYPENAME _RWSTD_DEQUE_ITER(1)::pointer pointer1;
+    typedef _TYPENAME _RWSTD_DEQUE_ITER(2)::pointer pointer2;

The names pointer1 and pointer2 need to privatized (e.g., _Pointer1).

Martin

+
+    if (pointer1 () == __x._C_cur || pointer2 () == __y._C_cur) {
+        // __x and/or __y is end-iterator of the empty deque
+        return _DiffT (__x._C_cur - __y._C_cur);
+    }
const _DiffT __bufsize = _DiffT (__x._C_bufsize ());



Reply via email to