Name

iterator_traits<T*> template specialization — Iterator traits specialized for pointers

Synopsis

template<typename  T>
struct iterator_traits<T*>{
  typedef ptrdiff_t difference_type;
  typedef T value_type;
  typedef T* pointer;
  typedef T& reference;
  typedef random_access_iterator_tag iterator_category;
};

The iterator_traits class template is specialized for pointers. This specialization lets you use a pointer as a random access iterator.