1 typedef __PTRDIFF_TYPE__ ptrdiff_t;
7 typedef ptrdiff_t difference_type;
14 T &operator [] (const difference_type &) const;
15 I &operator = (const I &);
20 I &operator += (const difference_type &);
21 I &operator -= (const difference_type &);
22 I operator + (const difference_type &) const;
23 I operator - (const difference_type &) const;
24 template <typename S> friend bool operator == (I<S> &, I<S> &);
25 template <typename S> friend bool operator == (const I<S> &, const I<S> &);
26 template <typename S> friend bool operator < (I<S> &, I<S> &);
27 template <typename S> friend bool operator < (const I<S> &, const I<S> &);
28 template <typename S> friend bool operator <= (I<S> &, I<S> &);
29 template <typename S> friend bool operator <= (const I<S> &, const I<S> &);
30 template <typename S> friend bool operator > (I<S> &, I<S> &);
31 template <typename S> friend bool operator > (const I<S> &, const I<S> &);
32 template <typename S> friend bool operator >= (I<S> &, I<S> &);
33 template <typename S> friend bool operator >= (const I<S> &, const I<S> &);
34 template <typename S> friend typename I<S>::difference_type operator - (I<S> &, I<S> &);
35 template <typename S> friend typename I<S>::difference_type operator - (const I<S> &, const I<S> &);
36 template <typename S> friend I<S> operator + (typename I<S>::difference_type , const I<S> &);
41 template <typename T> bool operator == (I<T> &, I<T> &);
42 template <typename T> bool operator == (const I<T> &, const I<T> &);
43 template <typename T> bool operator != (I<T> &, I<T> &);
44 template <typename T> bool operator != (const I<T> &, const I<T> &);
45 template <typename T> bool operator < (I<T> &, I<T> &);
46 template <typename T> bool operator < (const I<T> &, const I<T> &);
47 template <typename T> bool operator <= (I<T> &, I<T> &);
48 template <typename T> bool operator <= (const I<T> &, const I<T> &);
49 template <typename T> bool operator > (I<T> &, I<T> &);
50 template <typename T> bool operator > (const I<T> &, const I<T> &);
51 template <typename T> bool operator >= (I<T> &, I<T> &);
52 template <typename T> bool operator >= (const I<T> &, const I<T> &);
53 template <typename T> typename I<T>::difference_type operator - (I<T> &, I<T> &);
54 template <typename T> typename I<T>::difference_type operator - (const I<T> &, const I<T> &);
55 template <typename T> I<T> operator + (typename I<T>::difference_type, const I<T> &);
57 ptrdiff_t foo (I<int> &);
58 I<int> &bar (I<int> &);
59 I<int> &baz (I<int> *);
72 for (i = 0; i != 64; i += j)
75 for (i = 64; i != 0; i -= j)
78 for (i = 0; i != 64; i -= k)
81 for (i = 64; i != 0; i += k)
84 for (i = 0; i != 64; i += m) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
87 for (i = 64; i != 0; i -= m) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
90 for (i = 0; i != 64; i -= n) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
93 for (i = 64; i != 0; i += n) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
96 for (i = 0; i != 64; i += o) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
99 for (i = 64; i != 0; i -= o) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
102 for (i = 0; i != 64; i -= p) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
105 for (i = 64; i != 0; i += p) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
110 f1 (I<int> &x, I<int> &y, I<int> &u, I<int> &v)
120 for (i = x; i != y; i++)
123 for (i = x; y != i; ++i)
126 for (i = x; i != y; i = i + 1)
129 for (i = x; i != y; i = 1 + i)
132 for (i = y; i != x; i--)
135 for (i = y; x != i; --i)
138 for (i = y; i != x; i = i - 1)
141 for (i = y; i != x; i = -1 + i)
144 for (i = x; i != y; i = i + k)
147 for (i = x; i != y; i = k + i)
150 for (i = y; i != x; i = i - k)
153 for (i = y; i != x; i = -k + i)
156 for (i = x; i != y; i = i - l)
159 for (i = x; i != y; i = -l + i)
162 for (i = y; i != x; i = i + l)
165 for (i = y; i != x; i = l + i)
168 for (i = x; i != y; i = i + 2) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
171 for (i = x; i != y; i = 7 + i) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
174 for (i = y; i != x; i = i - 2) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
177 for (i = y; i != x; i = -7 + i) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
180 for (i = x; i != y; i = i + m) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
183 for (i = x; i != y; i = m + i) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
186 for (i = y; i != x; i = i - m) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
189 for (i = y; i != x; i = -m + i) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
192 for (i = x; i != y; i = i - n) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
195 for (i = x; i != y; i = -n + i) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
198 for (i = y; i != x; i = i + n) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
201 for (i = y; i != x; i = n + i) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
204 for (i = x; i != y; i = i + o) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
207 for (i = x; i != y; i = o + i) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
210 for (i = y; i != x; i = i - o) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
213 for (i = y; i != x; i = -o + i) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
216 for (i = x; i != y; i = i - p) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
219 for (i = x; i != y; i = -p + i) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
222 for (i = y; i != x; i = i + p) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }
225 for (i = y; i != x; i = p + i) // { dg-error "increment is not constant 1 or -1 for '!=' condition" }