diff --git a/doc/BidirectionalTraversal.html b/doc/BidirectionalTraversal.html index 0daa77e..9de555e 100644 --- a/doc/BidirectionalTraversal.html +++ b/doc/BidirectionalTraversal.html @@ -3,18 +3,18 @@ - + Bidirectional Traversal Concept -

Bidirectional Traversal Concept

+

A class or built-in type X models the Bidirectional Traversal concept if, in addition to X meeting the requirements of Forward Traversal Iterator, the following expressions are valid and respect the stated semantics.

- +
diff --git a/doc/ForwardTraversal.html b/doc/ForwardTraversal.html index abe055f..80447aa 100644 --- a/doc/ForwardTraversal.html +++ b/doc/ForwardTraversal.html @@ -3,18 +3,18 @@ - +Forward Traversal Concept -

Forward Traversal Concept

+

A class or built-in type X models the Forward Traversal concept if, in addition to X meeting the requirements of Default Constructible and Single Pass Iterator, the following expressions are valid and respect the stated semantics.

-
+
diff --git a/doc/IncrementableIterator.html b/doc/IncrementableIterator.html index c3ccfd7..0544d22 100644 --- a/doc/IncrementableIterator.html +++ b/doc/IncrementableIterator.html @@ -3,18 +3,18 @@ - +Incrementable Iterator Concept -

Incrementable Iterator Concept

+

A class or built-in type X models the Incrementable Iterator concept if, in addition to X being Assignable and Copy Constructible, the following expressions are valid and respect the stated semantics.

-
+
diff --git a/doc/LvalueIterator.html b/doc/LvalueIterator.html index 3e3f97a..29b3187 100644 --- a/doc/LvalueIterator.html +++ b/doc/LvalueIterator.html @@ -3,17 +3,17 @@ - +Lvalue Iterator Concept -

Lvalue Iterator Concept

+

The Lvalue Iterator concept adds the requirement that the return type of operator* type be a reference to the value type of the iterator.

-
+
diff --git a/doc/RandomAccessTraversal.html b/doc/RandomAccessTraversal.html index 4f7f40e..761ab0d 100644 --- a/doc/RandomAccessTraversal.html +++ b/doc/RandomAccessTraversal.html @@ -3,19 +3,19 @@ - +Random Access Traversal Concept -

Random Access Traversal Concept

+

A class or built-in type X models the Random Access Traversal concept if the following expressions are valid and respect the stated semantics. In the table below, Distance is iterator_traits<X>::difference_type and n represents a constant object of type Distance.

-
+
diff --git a/doc/ReadableIterator.html b/doc/ReadableIterator.html index 57edb8f..df231d3 100644 --- a/doc/ReadableIterator.html +++ b/doc/ReadableIterator.html @@ -3,19 +3,19 @@ - +Readable Iterator Concept -

Readable Iterator Concept

+

A class or built-in type X models the Readable Iterator concept for value type T if, in addition to X being Assignable and Copy Constructible, the following expressions are valid and respect the stated semantics. U is the type of any specified member of type T.

-
+
diff --git a/doc/SinglePassIterator.html b/doc/SinglePassIterator.html index a6091c7..bd176d8 100644 --- a/doc/SinglePassIterator.html +++ b/doc/SinglePassIterator.html @@ -3,17 +3,17 @@ - +Single Pass Iterator Concept -

Single Pass Iterator Concept

+

A class or built-in type X models the Single Pass Iterator concept if the following expressions are valid and respect the stated semantics.

-
+
diff --git a/doc/SwappableIterator.html b/doc/SwappableIterator.html index faf0347..7478e5f 100644 --- a/doc/SwappableIterator.html +++ b/doc/SwappableIterator.html @@ -3,17 +3,17 @@ - +Swappable Iterator Concept -

Swappable Iterator Concept

+

A class or built-in type X models the Swappable Iterator concept if, in addition to X being Copy Constructible, the following expressions are valid and respect the stated semantics.

-
+
diff --git a/doc/WritableIterator.html b/doc/WritableIterator.html index dafee1c..c3676bf 100644 --- a/doc/WritableIterator.html +++ b/doc/WritableIterator.html @@ -3,18 +3,18 @@ - +Writable Iterator Concept -

Writable Iterator Concept

+

A class or built-in type X models the Writable Iterator concept if, in addition to X being Copy Constructible, the following expressions are valid and respect the stated semantics. Writable Iterators have an associated set of value types.

-
+
diff --git a/doc/counting_iterator.html b/doc/counting_iterator.html index a098422..6949231 100644 --- a/doc/counting_iterator.html +++ b/doc/counting_iterator.html @@ -3,16 +3,15 @@ - +Counting Iterator - - + + -

Counting Iterator

@@ -27,11 +26,12 @@ Lab, University of Hanover Institute for Transport Railway Operation and Construction - + - +
Date:2004-01-15
2004-11-01
Copyright:Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. All rights reserved
Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003.
+
@@ -52,7 +52,7 @@ are forwarded to the adapted object.

-

Table of Contents

+

Table of Contents

  • counting_iterator synopsis
  • counting_iterator requirements
  • diff --git a/doc/counting_iterator.pdf b/doc/counting_iterator.pdf index cce54f8..9af2b6d 100755 Binary files a/doc/counting_iterator.pdf and b/doc/counting_iterator.pdf differ diff --git a/doc/facade-and-adaptor.html b/doc/facade-and-adaptor.html index 96df558..40d42f3 100755 --- a/doc/facade-and-adaptor.html +++ b/doc/facade-and-adaptor.html @@ -7,7 +7,7 @@ Iterator Facade and Adaptor - + @@ -24,7 +24,7 @@ Boost Consulting, Indiana University Open Systems Lab, Zephyr Associates, Inc. Date: -2004-01-21 +2004-11-01 Number:This is a revised version of N1530=03-0113, which was accepted for Technical Report 1 by the C++ standard committee's library working group. @@ -38,7 +38,7 @@ n1530_, the paper accepted by the LWG. --> -copyright:Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. All rights reserved +copyright:Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. @@ -266,8 +266,7 @@ interoperability without introducing unwanted overloads.

    Iterator Facade

    - +

    While the iterator interface is rich, there is a core subset of the interface that is necessary for all the functionality. We have identified the following core behaviors for iterators:

    @@ -454,8 +453,7 @@ Patterns, C++ Report, February 1995, pp. 24-27.

    Iterator Adaptor

    - +

    The iterator_adaptor class template adapts some Base 3 type to create a new iterator. Instantiations of iterator_adaptor are derived from a corresponding instantiation of iterator_facade @@ -603,8 +601,7 @@ and associated types, to be supplied by a derived iterator class.

    Class template iterator_facade

    - +
     template <
         class Derived
    @@ -1168,8 +1165,7 @@ operator -(iterator_facade<Dr1,V1,TC1,R1,D1> const& lhs,
     

    Iterator adaptor [lib.iterator.adaptor]

    - +

    Each specialization of the iterator_adaptor class template is derived from a specialization of iterator_facade. The core interface functions expected by iterator_facade are implemented in terms of the @@ -1184,8 +1180,7 @@ core interface functions of iterator_facad

    Class template iterator_adaptor

    - +
     template <
         class Derived
    diff --git a/doc/facade-and-adaptor.pdf b/doc/facade-and-adaptor.pdf
    index 518975f..e484a71 100755
    Binary files a/doc/facade-and-adaptor.pdf and b/doc/facade-and-adaptor.pdf differ
    diff --git a/doc/filter_iterator.html b/doc/filter_iterator.html
    index d1d90a7..fe607cd 100644
    --- a/doc/filter_iterator.html
    +++ b/doc/filter_iterator.html
    @@ -3,16 +3,15 @@
     
     
     
    -
    +
     Filter Iterator
     
     
    -
    -
    +
    +
     
     
     
    -

    Filter Iterator

    @@ -27,11 +26,12 @@ Lab, University of Hanover Institute for Transport Railway Operation and Construction - + - +
    Date:2004-01-13
    2004-11-01
    Copyright:Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. All rights reserved
    Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003.
    +
    @@ -50,7 +50,7 @@ sequence to be traversed.
    -

    Table of Contents

    +

    Table of Contents

    • filter_iterator synopsis
    • filter_iterator requirements
    • @@ -116,7 +116,7 @@ the expression p(x) must be va

      The concepts that filter_iterator models are dependent on which concepts the Iterator argument models, as specified in the following tables.

      - +
      @@ -135,7 +135,7 @@ following tables.

      - +
      @@ -157,7 +157,7 @@ following tables.

      - +
      diff --git a/doc/filter_iterator.pdf b/doc/filter_iterator.pdf index 6796256..2e5d9bb 100755 Binary files a/doc/filter_iterator.pdf and b/doc/filter_iterator.pdf differ diff --git a/doc/filter_iterator_ref.html b/doc/filter_iterator_ref.html index 2ca03a0..fe3fde8 100755 --- a/doc/filter_iterator_ref.html +++ b/doc/filter_iterator_ref.html @@ -3,11 +3,16 @@ - + +
      + + + +
       template <class Predicate, class Iterator>
       class filter_iterator
      @@ -29,35 +34,36 @@ class filter_iterator
               );
           Predicate predicate() const;
           Iterator end() const;
      -    Iterator base() const;
      +    Iterator const& base() const;
           reference operator*() const;
           filter_iterator& operator++();
       private:
      -    Predicate m_pred; // exposition
      -    Iterator m_iter;  // exposition
      -    Iterator m_end;   // exposition
      +    Predicate m_pred; // exposition only
      +    Iterator m_iter;  // exposition only
      +    Iterator m_end;   // exposition only
       };
       
      -

      The iterator_category member is a type convertible to the tags -corresponding to each standard concept modeled by filter_iterator, -as described in the models section.

      +

      If Iterator models Readable Lvalue Iterator and Forward Traversal +Iterator then iterator_category is convertible to +std::forward_iterator_tag. Otherwise iterator_category is +convertible to std::input_iterator_tag.

      filter_iterator requirements

      +

      The Iterator argument shall meet the requirements of Readable +Iterator and Single Pass Iterator or it shall meet the requirements of +Input Iterator.

      The Predicate argument must be Assignable, Copy Constructible, and the expression p(x) must be valid where p is an object of type Predicate, x is an object of type iterator_traits<Iterator>::value_type, and where the type of p(x) must be convertible to bool.

      -

      The Iterator argument shall meet the requirements of Readable -Iterator and Single Pass Iterator or it shall meet the requirements of -Input Iterator.

      filter_iterator models

      The concepts that filter_iterator models are dependent on which concepts the Iterator argument models, as specified in the following tables.

      -
      +
      @@ -76,7 +82,7 @@ following tables.

      - +
      @@ -98,7 +104,7 @@ following tables.

      - +
      @@ -120,6 +126,8 @@ following tables.

      +

      filter_iterator<P1, X> is interoperable with filter_iterator<P2, Y> +if and only if X is interoperable with Y.

    filter_iterator operations

    @@ -133,7 +141,7 @@ operations.

    Requires:Predicate and Iterator must be Default Constructible. -Returns:a filter_iterator whose``m_pred``, m_iter, and m_end +Effects:Constructs a filter_iterator whose``m_pred``, m_iter, and m_end members are a default constructed. @@ -143,7 +151,7 @@ members are a default constructed. -Returns:A filter_iterator where m_iter is either +Effects:Constructs a filter_iterator where m_iter is either the first position in the range [x,end) such that f(*m_iter) == true or else``m_iter == end``. The member m_pred is constructed from f and m_end from end. @@ -155,9 +163,10 @@ or else``m_iter == end``. The member m_pre -Requires:Predicate must be Default Constructible. +Requires:Predicate must be Default Constructible and +Predicate is a class type (not a function pointer). -Returns:A filter_iterator where m_iter is either +Effects:Constructs a filter_iterator where m_iter is either the first position in the range [x,end) such that m_pred(*m_iter) == true or else``m_iter == end``. The member m_pred is default constructed. @@ -176,7 +185,7 @@ filter_iterator( Requires:OtherIterator is implicitly convertible to Iterator. -Returns:A filter iterator whose members are copied from t. +Effects:Constructs a filter iterator whose members are copied from t. @@ -198,7 +207,7 @@ filter_iterator( -

    Iterator base() const;

    +

    Iterator const& base() const;

    @@ -231,10 +240,9 @@ or m_pred(*m_iter) + diff --git a/doc/function_output_iterator.html b/doc/function_output_iterator.html index 5addaa5..be94d79 100644 --- a/doc/function_output_iterator.html +++ b/doc/function_output_iterator.html @@ -7,8 +7,8 @@ Function Output Iterator - - + + @@ -26,9 +26,9 @@ Lab, University of Hanover Institute for Transport Railway Operation and Construction - + - +
    Date:2004-01-13
    2004-11-01
    Copyright:Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. All rights reserved
    Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003.
    diff --git a/doc/function_output_iterator.pdf b/doc/function_output_iterator.pdf index 494677a..e14507b 100755 Binary files a/doc/function_output_iterator.pdf and b/doc/function_output_iterator.pdf differ diff --git a/doc/index.html b/doc/index.html index 0d50c62..2641959 100755 --- a/doc/index.html +++ b/doc/index.html @@ -3,7 +3,7 @@ - + The Boost.Iterator Library Boost @@ -24,7 +24,7 @@ Lab, Zephyr Associat date:$Date$ -copyright:Copyright David Abrahams, Jeremy Siek, Thomas Witt 2003. All rights reserved +copyright:Copyright David Abrahams, Jeremy Siek, Thomas Witt 2003. diff --git a/doc/index.rst b/doc/index.rst index c0bfd73..8f3a947 100755 --- a/doc/index.rst +++ b/doc/index.rst @@ -17,7 +17,7 @@ __ ../../../index.htm Lab`_, `Zephyr Associates, Inc.`_ :date: $Date$ -:copyright: Copyright David Abrahams, Jeremy Siek, Thomas Witt 2003. All rights reserved +:copyright: Copyright David Abrahams, Jeremy Siek, Thomas Witt 2003. .. _`Boost Consulting`: http://www.boost-consulting.com .. _`Open Systems Lab`: http://www.osl.iu.edu diff --git a/doc/indirect_iterator.html b/doc/indirect_iterator.html index c1fe764..bbfc7bc 100644 --- a/doc/indirect_iterator.html +++ b/doc/indirect_iterator.html @@ -3,16 +3,15 @@ - + Indirect Iterator - - + + -

    Indirect Iterator

    @@ -27,11 +26,12 @@ Lab, University of Hanover Institute for Transport Railway Operation and Construction - + - +
    Date:2004-01-15
    2004-11-01
    Copyright:Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. All rights reserved
    Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003.
    +
    @@ -48,7 +48,7 @@ not an iterator.
    -

    Table of Contents

    +

    Table of Contents

    • indirect_iterator synopsis
    • indirect_iterator requirements
    • diff --git a/doc/indirect_iterator.pdf b/doc/indirect_iterator.pdf index 357d91f..0201779 100755 Binary files a/doc/indirect_iterator.pdf and b/doc/indirect_iterator.pdf differ diff --git a/doc/indirect_iterator_ref.html b/doc/indirect_iterator_ref.html index 08e5018..d69a8bc 100755 --- a/doc/indirect_iterator_ref.html +++ b/doc/indirect_iterator_ref.html @@ -3,7 +3,8 @@ - + + @@ -38,64 +39,91 @@ class indirect_iterator > const& y , typename enable_if_convertible<Iterator2, Iterator>::type* = 0 // exposition ); + + Iterator const& base() const; + reference operator*() const; + indirect_iterator& operator++(); + indirect_iterator& operator--(); +private: + Iterator m_iterator; // exposition };
    -

    The member types of indirect_iterator are defined according to the -following pseudo-code. We use the abbreviation -V=iterator_traits<Iterator>::value_type and v is an object of -type V.:

    +

    The member types of indirect_iterator are defined according to +the following pseudo-code, where V is +iterator_traits<Iterator>::value_type

     if (Value is use_default) then
    -    typedef iterator_traits<V>::value_type value_type;
    +    typedef remove_const<pointee<V>::type>::type value_type;
     else
         typedef remove_const<Value>::type value_type;
     
     if (Reference is use_default) then
    -    typedef iterator_traits<V>::reference reference;
    +    if (Value is use_default) then
    +        typedef indirect_reference<V>::type reference;
    +    else
    +        typedef Value& reference;
     else
         typedef Reference reference;
     
    -typedef Value* pointer;
    +if (Value is use_default) then 
    +    typedef pointee<V>::type* pointer;
    +else 
    +    typedef Value* pointer;
     
     if (Difference is use_default)
         typedef iterator_traits<Iterator>::difference_type difference_type;
     else
         typedef Difference difference_type;
    +
    +if (CategoryOrTraversal is use_default)
    +    typedef iterator-category (
    +        iterator_traversal<Iterator>::type,``reference``,``value_type``
    +    ) iterator_category;
    +else
    +    typedef iterator-category (
    +        CategoryOrTraversal,``reference``,``value_type``
    +    ) iterator_category;
     
    -

    The member indirect_iterator::iterator_category is a type that -satisfies the requirements of the concepts modeled by the indirect -iterator as specified in the models section.

    indirect_iterator requirements

    -

    The Iterator argument shall meet the requirements of Readable -Iterator. The CategoryOrTraversal argument shall be one of the -standard iterator tags or use_default. If CategoryOrTraversal -is an iterator tag, the template parameter Iterator argument shall -meet the traversal requirements corresponding to the iterator tag.

    -

    The expression *v, where v is an object of type -iterator_traits<Iterator>::value_type, must be a valid expression -and must be convertible to indirect_iterator::reference. Also, -there are further requirements on the -iterator_traits<Iterator>::value_type if the Value parameter -is not use_default, as implied by the algorithm for deducing the -default for the value_type member.

    +

    The expression *v, where v is an object of +iterator_traits<Iterator>::value_type, shall be valid +expression and convertible to reference. Iterator shall +model the traversal concept indicated by iterator_category. +Value, Reference, and Difference shall be chosen so +that value_type, reference, and difference_type meet +the requirements indicated by iterator_category.

    +

    [Note: there are further requirements on the +iterator_traits<Iterator>::value_type if the Value +parameter is not use_default, as implied by the algorithm for +deducing the default for the value_type member.]

    indirect_iterator models

    -

    If CategoryOrTraversal is a standard iterator tag, -indirect_iterator is a model of the iterator concept corresponding -to the tag, otherwise indirect_iterator satisfies the requirements -of the most refined standard traversal concept that is satisfied by -the Iterator argument.

    -

    indirect_iterator models Readable Iterator. If -indirect_iterator::reference(*v) = t is a valid expression (where -t is an object of type indirect_iterator::value_type) then -indirect_iterator models Writable Iterator. If -indirect_iterator::reference is a reference then -indirect_iterator models Lvalue Iterator.

    +

    In addition to the concepts indicated by iterator_category +and by iterator_traversal<indirect_iterator>::type, a +specialization of indirect_iterator models the following +concepts, Where v is an object of +iterator_traits<Iterator>::value_type:

    +
    +
      +
    • Readable Iterator if reference(*v) is convertible to +value_type.
    • +
    • Writable Iterator if reference(*v) = t is a valid +expression (where t is an object of type +indirect_iterator::value_type)
    • +
    • Lvalue Iterator if reference is a reference type.
    • +
    +
    +

    indirect_iterator<X,V1,C1,R1,D1> is interoperable with +indirect_iterator<Y,V2,C2,R2,D2> if and only if X is +interoperable with Y.

    indirect_iterator operations

    +

    In addition to the operations required by the concepts described +above, specializations of indirect_iterator provide the +following operations.

    indirect_iterator();

    @@ -103,8 +131,8 @@ the Iterator argument.

    - +
    Requires:Iterator must be Default Constructible.
    Returns:An instance of indirect_iterator with -a default-constructed iterator_adaptor subobject.
    Effects:Constructs an instance of indirect_iterator with +a default-constructed m_iterator.
    @@ -113,8 +141,8 @@ a default-constructed iterator_adaptor -Returns:An instance of indirect_iterator with -the iterator_adaptor subobject copy constructed from x. +Effects:Constructs an instance of indirect_iterator with +m_iterator copy constructed from x. @@ -136,12 +164,57 @@ indirect_iterator( Requires:Iterator2 is implicitly convertible to Iterator. -Returns:An instance of indirect_iterator whose -iterator_adaptor subobject is constructed from y.base(). +Effects:Constructs an instance of indirect_iterator whose +m_iterator subobject is constructed from y.base(). + + + +

    Iterator const& base() const;

    + +++ + + + +
    Returns:m_iterator
    +

    reference operator*() const;

    + +++ + + + +
    Returns:**m_iterator
    +

    indirect_iterator& operator++();

    + +++ + + + + + +
    Effects:++m_iterator
    Returns:*this
    +

    indirect_iterator& operator--();

    + +++ + + +
    Effects:--m_iterator
    Returns:*this
+ + diff --git a/doc/issues.html b/doc/issues.html index 8087b45..122a9c3 100755 --- a/doc/issues.html +++ b/doc/issues.html @@ -3,13 +3,13 @@ - + Problem with is_writable and is_swappable in N1550 -

Problem with is_writable and is_swappable in N1550

+
@@ -30,7 +30,7 @@ at http://www.b
-

Table of Contents

+

Table of Contents

+ + diff --git a/doc/iter-issue-list.html b/doc/iter-issue-list.html index 695b466..abe7c7a 100755 --- a/doc/iter-issue-list.html +++ b/doc/iter-issue-list.html @@ -3,27 +3,24 @@ - + Iterator concept and adapter issues - - + -

Iterator concept and adapter issues

- - - +
Date:2004-01-21
Copyright:Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003.
2004-01-27
+
-

Index

+

Index

  • Issues from Matt's TR issues list
    • 9.1 iterator_access overspecified?
    • @@ -800,7 +797,7 @@ capability.

      From the Readable Iterator Requirements table, remove:

      - +
      @@ -816,7 +813,7 @@ capability.

      From the Writable Iterator Requirements table, remove:

      -
      +
      @@ -832,7 +829,7 @@ capability.

      From the Swappable Iterator Requirements table, remove:

      -
      +
      @@ -1632,7 +1629,7 @@ random_access_traversal_tag

      In [lib.iterator.traversal]:

      Change:

      -
      +
      @@ -1649,7 +1646,7 @@ random_access_traversal_tag

      to:

      -
      +
      @@ -1666,7 +1663,7 @@ random_access_traversal_tag

      Change:

      -
      +
      @@ -1683,7 +1680,7 @@ random_access_traversal_tag

      to:

      -
      +
      @@ -1700,7 +1697,7 @@ random_access_traversal_tag

      Change:

      -
      +
      @@ -1717,7 +1714,7 @@ random_access_traversal_tag

      to:

      -
      +
      @@ -1734,7 +1731,7 @@ random_access_traversal_tag

      Change:

      -
      +
      @@ -1751,7 +1748,7 @@ random_access_traversal_tag

      to:

      -
      +
      @@ -1768,7 +1765,7 @@ random_access_traversal_tag

      Change:

      -
      +
      @@ -1787,7 +1784,7 @@ random_access_traversal_tag

      to:

      -
      +
      @@ -2452,7 +2449,7 @@ Incrementable Iterator concepts.
      -

      function_output_iterator models

      +

      function_output_iterator models

      function_output_iterator is a model of the Writable and Incrementable Iterator concepts.
      @@ -2612,7 +2609,7 @@ of any specified member of type T

      From the Input Iterator Requirements table, remove:

      - +
      @@ -2629,7 +2626,7 @@ of any specified member of type T

      Change:

      -
      +
      @@ -2648,7 +2645,7 @@ equivalent to *b

      to:

      -
      +
      @@ -2678,7 +2675,7 @@ type of the iterator.

      Change:

      -
      +
      @@ -2705,7 +2702,7 @@ cv-qualification

      to:

      -
      +
      @@ -2970,7 +2967,7 @@ does not provide the 'b' versions of these functions.

       

      Remove the 'b' versions.

      In iterator_facade requirements, remove:

      - +
      @@ -2989,7 +2986,7 @@ equivalent.

      and remove:

      -
      +
      @@ -3063,7 +3060,7 @@ distance(c, (X)z)?

       

      Removed the 'b' versions (see 9.35) and added the cast.

      Change:

      - +
      @@ -3085,7 +3082,7 @@ Iterator

      to:

      -
      +
      @@ -3154,7 +3151,7 @@ below, x is an object of type type Y, Distance is iterator_traits<Y>::difference_type, and n represents a constant object of type Distance.

      -
      +
      @@ -3195,7 +3192,7 @@ constant object of type Distance

      If X and Y both model Random Access Traversal Iterator then the following additional requirements must be met.

      -
      +
      @@ -3294,7 +3291,7 @@ class iterator_adaptor
      -

      iterator_adaptor base class parameters

      +

      iterator_adaptor base class parameters

      The V', C', R', and D' parameters of the iterator_facade used as a base class in the summary of iterator_adaptor @@ -3404,7 +3401,7 @@ else

      After the requirements section, add:

      -

      indirect_iterator models

      +

      indirect_iterator models

      In addition to the concepts indicated by iterator_category and by iterator_traversal<indirect_iterator>::type, a @@ -3569,13 +3566,13 @@ by Iterator.

      -

      reverse_iterator models

      +

      reverse_iterator models

      A specialization of reverse_iterator models the same iterator traversal and iterator access concepts modeled by its Iterator argument. In addition, it may model old iterator concepts specified in the following table:

      - +
      @@ -3798,7 +3795,7 @@ The value_type is -

      transform_iterator models

      +

      transform_iterator models

      The resulting transform_iterator models the most refined of the following options that is also modeled by Iterator.

      @@ -3817,7 +3814,7 @@ concept that is modeled by the IteratorIf transform_iterator is a model of Readable Lvalue Iterator then it models the following original iterator concepts depending on what the Iterator argument models.

      -
      +
      @@ -3946,12 +3943,12 @@ Input Iterator.

      After the requirements section, add:

      -

      filter_iterator models

      +

      filter_iterator models

      The concepts that filter_iterator models are dependent on which concepts the Iterator argument models, as specified in the following tables.

      -
      +
      @@ -3970,7 +3967,7 @@ following tables.

      - +
      @@ -3992,7 +3989,7 @@ following tables.

      - +
      @@ -4287,7 +4284,7 @@ the following must must also be valid:

      After the requirements section, add:

      -

      counting_iterator models

      +

      counting_iterator models

      Specializations of counting_iterator model Readable Lvalue Iterator. In addition, they model the concepts corresponding to the @@ -4433,7 +4430,7 @@ object copy constructed from x

      c++std-lib-12585:

      Readable Iterator Requirements says:

      -
      +
      @@ -4802,7 +4799,7 @@ struct indirect_reference;
      -

      Class template pointee

      +

      Class template pointee

      @@ -4846,7 +4843,7 @@ else
      -

      Class template indirect_reference

      +

      Class template indirect_reference

      @@ -4991,7 +4988,7 @@ Traversal Iterator to include Default Constructible.

      A class or built-in type X models the Forward Traversal Iterator concept if the following expressions are valid and respect the stated semantics.

      - +
      @@ -5010,7 +5007,7 @@ concept if, in addition to X m Default Constructible and Single Pass Iterator, the following expressions are valid and respect the stated semantics.

      -
      +
      @@ -5122,7 +5119,7 @@ object of type X, z is a constant object of a random access traversal iterator type interoperable with X.

      -
      +
      @@ -5202,7 +5199,7 @@ object of a single pass iterator type interoperable with X.

      iterator_facade Core Operations

      -
      +
      diff --git a/doc/iterator_adaptor.html b/doc/iterator_adaptor.html index d09d4c5..14ca2b1 100644 --- a/doc/iterator_adaptor.html +++ b/doc/iterator_adaptor.html @@ -3,12 +3,12 @@ - +Iterator Adaptor - - + + @@ -26,9 +26,9 @@ Lab, University of Hanover Institute for Transport Railway Operation and Construction - + - +
      Date:2004-01-12
      2004-11-01
      Copyright:Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. All rights reserved
      Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003.
      @@ -42,8 +42,7 @@ Railway Operation and Construction
      - +

      Each specialization of the iterator_adaptor class template is derived from a specialization of iterator_facade. The core interface functions expected by iterator_facade are implemented in terms of the @@ -73,8 +72,7 @@ core interface functions of iterator_facad

      Overview

      - +

      The iterator_adaptor class template adapts some Base 1 type to create a new iterator. Instantiations of iterator_adaptor are derived from a corresponding instantiation of iterator_facade @@ -115,8 +113,7 @@ that assumption.

      Reference

      - +
       template <
           class Derived
      diff --git a/doc/iterator_adaptor.pdf b/doc/iterator_adaptor.pdf
      index 1dca935..f2ceb96 100755
      Binary files a/doc/iterator_adaptor.pdf and b/doc/iterator_adaptor.pdf differ
      diff --git a/doc/iterator_adaptor_ref.html b/doc/iterator_adaptor_ref.html
      index 7a9b9b9..b979f74 100755
      --- a/doc/iterator_adaptor_ref.html
      +++ b/doc/iterator_adaptor_ref.html
      @@ -3,33 +3,34 @@
       
       
       
      -
      +
      +
       
       
       
       
      - +
       template <
           class Derived
         , class Base
      -  , class Value        = use_default
      -  , class CategoryOrTraversal  = use_default
      -  , class Reference  = use_default
      +  , class Value               = use_default
      +  , class CategoryOrTraversal = use_default
      +  , class Reference           = use_default
         , class Difference = use_default
       >
       class iterator_adaptor 
      -  : public iterator_facade<Derived, V, C, R, D> // see details
      +  : public iterator_facade<Derived, V', C', R', D'> // see details
       {
           friend class iterator_core_access;
        public:
           iterator_adaptor();
           explicit iterator_adaptor(Base iter);
      -    Base base() const;
      +    Base const& base() const;
        protected:
      +    typedef iterator_adaptor iterator_adaptor_;
           Base const& base_reference() const;
           Base& base_reference();
        private: // Core iterator interface for iterator_facade.  
      @@ -54,23 +55,28 @@ class iterator_adaptor
           Base m_iterator; // exposition only
       };
       
      -
      +
      +

      iterator_adaptor requirements

      +

      static_cast<Derived*>(iterator_adaptor*) shall be well-formed. +The Base argument shall be Assignable and Copy Constructible.

      +
      +

      iterator_adaptor base class parameters

      -

      The V, C, R, and D parameters of the iterator_facade +

      The V', C', R', and D' parameters of the iterator_facade used as a base class in the summary of iterator_adaptor above are defined as follows:

      -V = if (Value is use_default)
      +V' = if (Value is use_default)
                 return iterator_traits<Base>::value_type
             else
                 return Value
       
      -C = if (CategoryOrTraversal is use_default)
      +C' = if (CategoryOrTraversal is use_default)
                 return iterator_traversal<Base>::type
             else
                 return CategoryOrTraversal
       
      -R = if (Reference is use_default)
      +R' = if (Reference is use_default)
                 if (Value is use_default)
                     return iterator_traits<Base>::reference
                 else
      @@ -78,23 +84,22 @@ above are defined as follows:

      else return Reference -D = if (Difference is use_default) +D' = if (Difference is use_default) return iterator_traits<Base>::difference_type else return Difference
      -
      -
      -

      iterator_adaptor usage

      -

      The Derived template parameter must be a publicly derived from -iterator_adaptor. In order for Derived to model the -iterator concepts corresponding to -iterator_traits<Derived>::iterator_category, the expressions -involving m_iterator in the specifications of those private -member functions of iterator_adaptor that may be called by -iterator_facade<Derived, V, C, R, D> -in evaluating any valid expression involving Derived -in those concepts' requirements.

      + + +

      iterator_adaptor public operations

      @@ -120,7 +125,7 @@ in those concepts' requirements.

      -

      Base base() const;

      +

      Base const& base() const;

      @@ -220,10 +225,9 @@ typename iterator_adaptor::difference_type distance_to(
- + diff --git a/doc/iterator_archetypes.html b/doc/iterator_archetypes.html index 143e9d0..ef61809 100755 --- a/doc/iterator_archetypes.html +++ b/doc/iterator_archetypes.html @@ -3,16 +3,15 @@ - + Iterator Archetype - - + + -

Iterator Archetype

@@ -26,11 +25,12 @@ - + - +
Boost Consulting, Indiana University Open Systems Lab, Zephyr Associates, Inc.
Date:2004-01-27
2004-11-01
Copyright:Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2004. All rights reserved
Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2004.
+
@@ -44,7 +44,7 @@ For further information see the documentation for the
-

Table of Contents

+

Table of Contents