diff --git a/doc/indirect_iterator_ref.rst b/doc/indirect_iterator_ref.rst index 5525c2e..0a35c90 100644 --- a/doc/indirect_iterator_ref.rst +++ b/doc/indirect_iterator_ref.rst @@ -3,25 +3,32 @@ template < class Iterator , class Value = use_default - , unsigned Access = use_default_access - , class Traversal = use_default + , class CategoryOrTraversal = use_default , class Reference = use_default , class Difference = use_default > class indirect_iterator - : public iterator_adaptor + : public iterator_adaptor< + indirect_iterator, + Iterator, + /* Value = see below */, + CategoryOrTraversal, + Reference, + Difference> { friend class iterator_core_access; public: indirect_iterator(); indirect_iterator(Iterator x); + template < - class Iterator2, class Value2, unsigned Access2, class Traversal2 + class Iterator2, class Value2, class Category2 , class Reference2, class Difference2 > indirect_iterator( indirect_iterator< - Iterator2, Value2, Access2, Traversal2, Reference2, Difference2 + Iterator2, Value2, Category2, Reference2, Difference2 > const& y , typename enable_if_convertible::type* = 0 // exposition ); @@ -35,13 +42,16 @@ ``indirect_iterator`` requirements .................................. -The ``value_type`` of the ``Iterator`` template parameter should -itself be dereferenceable. The return type of the ``operator*`` for -the ``value_type`` must be the same type as the ``Reference`` template -parameter. The ``Value`` template parameter will be the ``value_type`` -for the ``indirect_iterator``, unless ``Value`` is const. If ``Value`` -is ``const X``, then ``value_type`` will be *non-* ``const X``. The -default for ``Value`` is +The following requirements are placed on the type +``iterator_traits::value_type``. Let ``i`` be an object of +type ``iterator_traits::value_type``. Then ``*i`` must be a +valid expression, and the type of ``*i`` must be the same as the +``Reference`` template parameter. + +The ``Value`` template parameter will be the ``value_type`` for the +``indirect_iterator``, unless ``Value`` is cv-qualified. If ``Value`` +is cv-qualified then ``value_type`` will be non-qualified version of +the type. The default for ``Value`` is :: @@ -51,18 +61,14 @@ If the default is used for ``Value``, then there must be a valid specialization of ``iterator_traits`` for the value type of the base iterator. -The ``Reference`` parameter will be the ``reference`` type of the -``indirect_iterator``. The default is ``Value&``. +.. THE ABOVE IS NO LONGER IN SYNC WITH THE CODE. -Jeremy -The ``Access`` and ``Traversal`` parameters are passed unchanged to -the corresponding parameters of the ``iterator_adaptor`` base -class, and the ``Iterator`` parameter is passed unchanged as the -``Base`` parameter to the ``iterator_adaptor`` base class. The indirect iterator will model the most refined standard traversal -concept that is modeled by the ``Iterator`` type. The indirect -iterator will model the most refined standard access concept that is -modeled by the value type of ``Iterator``. +concept that is modeled by the ``Iterator`` type and that refines the +traversal category specified in the ``CategoryOrTraversal`` parameter. +The indirect iterator will model the most refined standard access +concept that is modeled by the value type of ``Iterator``. ``indirect_iterator`` operations @@ -71,8 +77,8 @@ modeled by the value type of ``Iterator``. ``indirect_iterator();`` :Requires: ``Iterator`` must be Default Constructible. -:Returns: An instance of ``indirect_iterator`` with - a default constructed base object. +:Returns: An instance of ``indirect_iterator`` with + a default-constructed ``iterator_adaptor`` subobject. ``indirect_iterator(Iterator x);`` @@ -94,5 +100,7 @@ modeled by the value type of ``Iterator``. ); :Requires: ``Iterator2`` is implicitly convertible to ``Iterator``. -:Returns: An instance of ``indirect_iterator`` that is a copy of ``y``. +:Returns: An instance of ``indirect_iterator`` whose +``iterator_adaptor`` subobject is constructed from ``y.base()``. +