STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Protected Attributes | Private Types | List of all members
reverse_iterator< _RanIt > Class Template Reference
Inheritance diagram for reverse_iterator< _RanIt >:
iterator< iterator_traits< _RanIt >::iterator_category, iterator_traits< _RanIt >::value_type, iterator_traits< _RanIt >::difference_type, iterator_traits< _RanIt >::pointer, iterator_traits< _RanIt >::reference >

Public Types

typedef iterator_traits< _RanIt >::difference_type difference_type
 
typedef iterator_traits< _RanIt >::pointer pointer
 
typedef iterator_traits< _RanIt >::reference reference
 
typedef _RanIt iterator_type
 
- Public Types inherited from iterator< iterator_traits< _RanIt >::iterator_category, iterator_traits< _RanIt >::value_type, iterator_traits< _RanIt >::difference_type, iterator_traits< _RanIt >::pointer, iterator_traits< _RanIt >::reference >
typedef iterator_traits< _RanIt >::iterator_category iterator_category
 
typedef iterator_traits< _RanIt >::value_type value_type
 
typedef iterator_traits< _RanIt >::difference_type difference_type
 
typedef iterator_traits< _RanIt >::pointer pointer
 
typedef iterator_traits< _RanIt >::reference reference
 

Public Member Functions

_CONSTEXPR17_11 reverse_iterator ()
 
_CONSTEXPR17_11 reverse_iterator (_RanIt _Right)
 
template<class _Other >
_CONSTEXPR17_11 reverse_iterator (const reverse_iterator< _Other > &_Right)
 
template<class _Other >
_CONSTEXPR17_14 _Mytoperator= (const reverse_iterator< _Other > &_Right)
 
_CONSTEXPR17_11 _RanIt base () const
 
_CONSTEXPR17_14 reference operator* () const
 
_CONSTEXPR17_14 pointer operator-> () const
 
_CONSTEXPR17_14 _Mytoperator++ ()
 
_CONSTEXPR17_14 _Myt operator++ (int)
 
_CONSTEXPR17_14 _Mytoperator-- ()
 
_CONSTEXPR17_14 _Myt operator-- (int)
 
_CONSTEXPR17_14 _Mytoperator+= (difference_type _Off)
 
_CONSTEXPR17_11 _Myt operator+ (difference_type _Off) const
 
_CONSTEXPR17_14 _Mytoperator-= (difference_type _Off)
 
_CONSTEXPR17_11 _Myt operator- (difference_type _Off) const
 
_CONSTEXPR17_14 reference operator[] (difference_type _Off) const
 

Protected Attributes

_RanIt current
 

Private Types

typedef reverse_iterator< _RanIt > _Myt
 

Member Typedef Documentation

template<class _RanIt>
typedef reverse_iterator<_RanIt> reverse_iterator< _RanIt >::_Myt
private
template<class _RanIt>
typedef iterator_traits<_RanIt>::difference_type reverse_iterator< _RanIt >::difference_type
template<class _RanIt>
typedef _RanIt reverse_iterator< _RanIt >::iterator_type
template<class _RanIt>
typedef iterator_traits<_RanIt>::pointer reverse_iterator< _RanIt >::pointer
template<class _RanIt>
typedef iterator_traits<_RanIt>::reference reverse_iterator< _RanIt >::reference

Constructor & Destructor Documentation

template<class _RanIt>
_CONSTEXPR17_11 reverse_iterator< _RanIt >::reverse_iterator ( )
inline
1172  : current()
1173  { // construct with value-initialized wrapped iterator
1174  }
_RanIt current
Definition: xutility:1268
template<class _RanIt>
_CONSTEXPR17_11 reverse_iterator< _RanIt >::reverse_iterator ( _RanIt  _Right)
inlineexplicit
1177  : current(_Right)
1178  { // construct wrapped iterator from _Right
1179  }
_RanIt current
Definition: xutility:1268
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _RanIt>
template<class _Other >
_CONSTEXPR17_11 reverse_iterator< _RanIt >::reverse_iterator ( const reverse_iterator< _Other > &  _Right)
inline
1183  : current(_Right.base())
1184  { // initialize with compatible base
1185  }
_RanIt current
Definition: xutility:1268
_CONSTEXPR17_11 _RanIt base() const
Definition: xutility:1194

Member Function Documentation

template<class _RanIt>
_CONSTEXPR17_11 _RanIt reverse_iterator< _RanIt >::base ( ) const
inline
1195  { // return wrapped iterator
1196  return (current);
1197  }
_RanIt current
Definition: xutility:1268
template<class _RanIt>
_CONSTEXPR17_14 reference reverse_iterator< _RanIt >::operator* ( ) const
inline
1200  { // return designated value
1201  _RanIt _Tmp = current;
1202  return (*--_Tmp);
1203  }
_RanIt current
Definition: xutility:1268
template<class _RanIt>
_CONSTEXPR17_11 _Myt reverse_iterator< _RanIt >::operator+ ( difference_type  _Off) const
inline
1247  { // return this + integer
1248  return (_Myt(current - _Off));
1249  }
_RanIt current
Definition: xutility:1268
reverse_iterator< _RanIt > _Myt
Definition: xutility:1163
template<class _RanIt>
_CONSTEXPR17_14 _Myt& reverse_iterator< _RanIt >::operator++ ( )
inline
1213  { // preincrement
1214  --current;
1215  return (*this);
1216  }
_RanIt current
Definition: xutility:1268
template<class _RanIt>
_CONSTEXPR17_14 _Myt reverse_iterator< _RanIt >::operator++ ( int  )
inline
1219  { // postincrement
1220  _Myt _Tmp = *this;
1221  --current;
1222  return (_Tmp);
1223  }
_RanIt current
Definition: xutility:1268
reverse_iterator< _RanIt > _Myt
Definition: xutility:1163
template<class _RanIt>
_CONSTEXPR17_14 _Myt& reverse_iterator< _RanIt >::operator+= ( difference_type  _Off)
inline
1241  { // increment by integer
1242  current -= _Off;
1243  return (*this);
1244  }
_RanIt current
Definition: xutility:1268
template<class _RanIt>
_CONSTEXPR17_11 _Myt reverse_iterator< _RanIt >::operator- ( difference_type  _Off) const
inline
1258  { // return this - integer
1259  return (_Myt(current + _Off));
1260  }
_RanIt current
Definition: xutility:1268
reverse_iterator< _RanIt > _Myt
Definition: xutility:1163
template<class _RanIt>
_CONSTEXPR17_14 _Myt& reverse_iterator< _RanIt >::operator-- ( )
inline
1226  { // predecrement
1227  ++current;
1228  return (*this);
1229  }
_RanIt current
Definition: xutility:1268
template<class _RanIt>
_CONSTEXPR17_14 _Myt reverse_iterator< _RanIt >::operator-- ( int  )
inline
1232  { // postdecrement
1233  _Myt _Tmp = *this;
1234  ++current;
1235  return (_Tmp);
1236  }
_RanIt current
Definition: xutility:1268
reverse_iterator< _RanIt > _Myt
Definition: xutility:1163
template<class _RanIt>
_CONSTEXPR17_14 _Myt& reverse_iterator< _RanIt >::operator-= ( difference_type  _Off)
inline
1252  { // decrement by integer
1253  current += _Off;
1254  return (*this);
1255  }
_RanIt current
Definition: xutility:1268
template<class _RanIt>
_CONSTEXPR17_14 pointer reverse_iterator< _RanIt >::operator-> ( ) const
inline
1206  { // return pointer to class object
1207  _RanIt _Tmp = current;
1208  --_Tmp;
1209  return (_Operator_arrow(_Tmp, is_pointer<_RanIt>()));
1210  }
_RanIt current
Definition: xutility:1268
constexpr _Iterator _Operator_arrow(_Iterator _Target, true_type)
Definition: xutility:1143
Definition: type_traits:366
template<class _RanIt>
template<class _Other >
_CONSTEXPR17_14 _Myt& reverse_iterator< _RanIt >::operator= ( const reverse_iterator< _Other > &  _Right)
inline
1189  { // assign from compatible base
1190  current = _Right.base();
1191  return (*this);
1192  }
_RanIt current
Definition: xutility:1268
_CONSTEXPR17_11 _RanIt base() const
Definition: xutility:1194
template<class _RanIt>
_CONSTEXPR17_14 reference reverse_iterator< _RanIt >::operator[] ( difference_type  _Off) const
inline
1263  { // subscript
1264  return (*(*this + _Off));
1265  }

Member Data Documentation

template<class _RanIt>
_RanIt reverse_iterator< _RanIt >::current
protected

The documentation for this class was generated from the following file: