Index: transform_iterator_ref.rst
===================================================================
RCS file: /cvsroot/boost/boost/libs/iterator/doc/transform_iterator_ref.rst,v
retrieving revision 1.3
retrieving revision 1.15
diff -w -d -u -b -r1.3 -r1.15
--- transform_iterator_ref.rst	21 Sep 2003 11:13:46 -0000	1.3
+++ transform_iterator_ref.rst	15 Jan 2004 00:06:57 -0000	1.15
@@ -1,3 +1,5 @@
+.. Version 1.3 of this document was accepted for TR1
+
 ::
 
   template <class UnaryFunction,
@@ -5,26 +7,55 @@
             class Reference = use_default, 
             class Value = use_default>
   class transform_iterator

Issue 9.37x

-    : public iterator_adaptor</* see discussion */>
   {
-    friend class iterator_core_access;
   public:
+    typedef /* see below */ value_type;
+    typedef /* see below */ reference;
+    typedef /* see below */ pointer;
+    typedef iterator_traits<Iterator>::difference_type difference_type;
+    typedef /* see below */ iterator_category;
+
     transform_iterator();
     transform_iterator(Iterator const& x, UnaryFunction f);
 

Issue 9.43x

-    template<class OtherIterator, class R2, class V2>
+    template<class F2, class I2, class R2, class V2>
     transform_iterator(
-          transform_iterator<UnaryFunction, OtherIterator, R2, V2> const& t
-        , typename enable_if_convertible<OtherIterator, Iterator>::type* = 0 // exposition
+          transform_iterator<F2, I2, R2, V2> const& t
+        , typename enable_if_convertible<I2, Iterator>::type* = 0      // exposition only
+        , typename enable_if_convertible<F2, UnaryFunction>::type* = 0 // exposition only
     );
-

Issues 9.37x and 9.12

+    Iterator const& base() const;
+    reference operator*() const;
+    transform_iterator& operator++();
+    transform_iterator& operator--();
   private:
-    typename transform_iterator::value_type dereference() const;
-    UnaryFunction m_f;
+    Iterator m_iterator; // exposition only
+    UnaryFunction m_f;   // exposition only
   };


Issue 9.41x
 
+If ``Reference`` is ``use_default`` then the ``reference`` member of
+``transform_iterator`` is
+``result_of<UnaryFunction(iterator_traits<Iterator>::reference)>::type``.
+Otherwise, ``reference`` is ``Reference``.
+
+If ``Value`` is ``use_default`` then the ``value_type`` member is
+``remove_cv<remove_reference<reference> >::type``.  Otherwise,
+``value_type`` is ``Value``.
+
+

Issue 9.37x

+If ``Iterator`` models Readable Lvalue Iterator and if ``Iterator``
+models Random Access Traversal Iterator, then ``iterator_category`` is
+convertible to ``random_access_iterator_tag``. Otherwise, if
+``Iterator`` models Bidirectional Traversal Iterator, then
+``iterator_category`` is convertible to
+``bidirectional_iterator_tag``.  Otherwise ``iterator_category`` is
+convertible to ``forward_iterator_tag``. If ``Iterator`` does not
+model Readable Lvalue Iterator then ``iterator_category`` is
+convertible to ``input_iterator_tag``.
+
+
 ``transform_iterator`` requirements
 ...................................
 
@@ -34,27 +65,55 @@
 where the type of ``f(*i)`` must be
 ``result_of<UnaryFunction(iterator_traits<Iterator>::reference)>::type``.


Issue 9.37x
 
-The type ``Iterator`` must at least model Readable Iterator.  The
-resulting ``transform_iterator`` models the most refined of the
+The argument ``Iterator`` shall model Readable Iterator.  
+
+
+``transform_iterator`` models
+.............................
+
+The resulting ``transform_iterator`` models the most refined of the
 following options that is also modeled by ``Iterator``.
 
-  * Writable Lvalue Iterator if ``result_of<UnaryFunction(iterator_traits<Iterator>::reference)>::type`` is a non-const reference. 
+  * Writable Lvalue Iterator if ``transform_iterator::reference`` is a non-const reference. 
 
-  * Readable Lvalue Iterator if ``result_of<UnaryFunction(iterator_traits<Iterator>::reference)>::type`` is a const
-    reference.
+  * Readable Lvalue Iterator if ``transform_iterator::reference`` is a const reference.
 
   * Readable Iterator otherwise. 
 
-
 The ``transform_iterator`` models the most refined standard traversal
-concept that is modeled by ``Iterator``.
+concept that is modeled by the ``Iterator`` argument.

Issue 9.41x
 
-The ``reference`` type of ``transform_iterator`` is
-``result_of<UnaryFunction(iterator_traits<Iterator>::reference)>::type``.
-The ``value_type`` is ``remove_cv<remove_reference<reference> >::type``.

Issue 9.37x.

+If ``transform_iterator`` is a model of Readable Lvalue Iterator then
+it models the following original iterator concepts depending on what
+the ``Iterator`` argument models.
 
-``transform_iterator`` public operations
-........................................
++-----------------------------------+---------------------------------+
+| If ``Iterator`` models            | then ``filter_iterator`` models |
++===================================+=================================+
+| Single Pass Iterator              | Input Iterator                  |
++-----------------------------------+---------------------------------+
+| Forward Traversal Iterator        | Forward Iterator                |
++-----------------------------------+---------------------------------+
+| Bidirectional Traversal Iterator  | Bidirectional Iterator          |
++-----------------------------------+---------------------------------+
+| Random Access Traversal Iterator  | Random Access Iterator          |
++-----------------------------------+---------------------------------+
+
+If ``transform_iterator`` models Writable Lvalue Iterator then it is a
+mutable iterator (as defined in the old iterator requirements).
+
+``transform_iterator<F1, X, R1, V1>`` is interoperable with
+``transform_iterator<F2, Y, R2, V2>`` if and only if ``X`` is
+interoperable with ``Y``.
+
+
+
+``transform_iterator`` operations
+.................................
+
+In addition to the operations required by the concepts modeled by
+``transform_iterator``, ``transform_iterator`` provides the following
+operations.
 
 
 ``transform_iterator();``
@@ -80,14 +139,30 @@
 :Returns: An instance of ``transform_iterator`` that is a copy of ``t``.
 :Requires: ``OtherIterator`` is implicitly convertible to ``Iterator``.
 
+
+``Iterator const& base() const;``
+
+:Returns: ``m_iterator``
+
+
 ``UnaryFunction functor() const;``
 
 :Returns: ``m_f``
 
-``transform_iterator`` private operations
-.........................................
 
-``typename transform_iterator::value_type dereference() const;``
+``reference operator*() const;``
 
-:Returns: ``m_f(transform_iterator::dereference());``
+:Returns: ``m_f(*m_iterator)``
+
+
+``transform_iterator& operator++();``
+
+:Effects: ``++m_iterator``
+:Returns: ``*this``
+
+
+``transform_iterator& operator--();``
+
+:Effects: ``--m_iterator``
+:Returns: ``*this``
 
