28 typedef ptrdiff_t difference_type;
31 typedef std::input_iterator_tag iterator_category;
110 return (m_iter-that.m_iter);
133 TrIterator<T> operator+(
int n,
const TrIterator<T>& iter)
135 return iter.operator+(n);
144 TrIterator<T> operator-(
int n,
const TrIterator<T>& iter)
146 return iter.operator-(n);
190 : m_begin(b), m_end(e) {}
204 if (m_begin>m_end)
invert();
214 m_begin = that.m_begin;
233 m_begin.operator++();
261 m_begin.operator--();
290 TrRange tmp(m_begin.operator+(n),
303 TrRange tmp(m_begin.operator-(n),
316 m_begin.operator+=(n);
329 m_begin.operator-=(n);
339 typename TrIterator<T>::difference_type
range()
const {
return (m_end - m_begin);}
355 bool operator==(
const TrRange& that)
const {
return ((m_begin==that.m_begin)&&(m_end==that.m_end));}
368 bool operator<(
const TrRange& that)
const {
return ((m_begin<that.m_begin) && (m_end<that.m_end));}
376 bool operator>(
const TrRange& that)
const {
return ((m_begin>that.m_begin) && (m_end>that.m_end));}
401 TrRange<T> operator+(
int n,
const TrRange<T>& range)
403 TrRange<T> tmp = range.operator+(n);
421 TrRange<T> operator-(
int n,
const TrRange<T>& range)
423 TrRange<T> tmp = range.operator-(n);