Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Struct template iterator

boost::type_erasure::iterator

Synopsis

// In header: <boost/type_erasure/iterator.hpp>

template<typename Traversal, typename T = _self, 
         typename Reference, 
         typename DifferenceType> 
struct iterator {
  // types
  typedef     ;     
  typedef Reference      ;      
  typedef DifferenceType ;
};

Description

The iterator concept can be used for any iterator category.

The value_type of the iterator is deduced. To force it to be a specific type, use the same_type concept.

Example:

Template Parameters

  1. typename Traversal

    must be one of boost::incrementable_traversal_tag, boost::single_pass_traversal_tag, boost::forward_traversal_tag, boost::bidirectional_traversal_tag, and boost::random_access_traversal_tag.

  2. typename T = _self

    The placeholder representing the iterator.

  3. typename Reference

    The reference type. If it is boost::use_default, then reference will be value_type&.

  4. typename DifferenceType

    The iterator's difference type.


PrevUpHomeNext