Listing 3: The STL’s iterator_traits

template<typename _It>
struct iterator_traits 
{
  typedef typename _It::iterator_category iterator_category;
  typedef typename _It::value_type value_type;
  typedef typename _It::difference_type difference_type;
  typedef typename _It::pointer pointer;
  typedef typename _It::reference reference;
};
— End of Listing —