diff --git a/doc/counting_iterator.html b/doc/counting_iterator.html index 56ed3e8..68aded9 100644 --- a/doc/counting_iterator.html +++ b/doc/counting_iterator.html @@ -95,9 +95,8 @@ integral type. Otherwise difference_typeIf CategoryOrTraversal is not use_default then the member iterator_category is CategoryOrTraversal. Otherwise, if Incrementable is a numeric type then iterator_category is a -type convertible to random_access_traversal_tag and -random_access_iterator_tag. If Incrementable is not a numeric -type then iterator_category is +type convertible to random_access_iterator_tag. If +Incrementable is not a numeric type then iterator_category is iterator_traversal<Incrementable>::type.

[Note: implementers are encouraged to provide an implementation of
@@ -262,7 +261,7 @@ indirectly printing out the numbers from 0 to 7 diff --git a/doc/counting_iterator_ref.rst b/doc/counting_iterator_ref.rst index faff595..84bf891 100644 --- a/doc/counting_iterator_ref.rst +++ b/doc/counting_iterator_ref.rst @@ -33,9 +33,8 @@ integral type. Otherwise ``difference_type`` is ``Difference``. If ``CategoryOrTraversal`` is not ``use_default`` then the member ``iterator_category`` is ``CategoryOrTraversal``. Otherwise, if ``Incrementable`` is a numeric type then ``iterator_category`` is a -type convertible to ``random_access_traversal_tag`` and -``random_access_iterator_tag``. If ``Incrementable`` is not a numeric -type then ``iterator_category`` is +type convertible to ``random_access_iterator_tag``. If +``Incrementable`` is not a numeric type then ``iterator_category`` is ``iterator_traversal::type``. diff --git a/doc/facade-and-adaptor.html b/doc/facade-and-adaptor.html index 78f4230..6957095 100755 --- a/doc/facade-and-adaptor.html +++ b/doc/facade-and-adaptor.html @@ -1318,7 +1318,7 @@ else typedef Reference reference; if (Value is use_default) then - typedef ?? pointer; + typedef iterator_traits<V>::value_type* pointer; else typedef Value* pointer; @@ -1327,9 +1327,21 @@ if (Difference is use_default) else typedef Difference difference_type; -

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

+

If CategoryOrTraversal is not use_default then +iterator_category is CategoryOrTraversal. Otherwise +iterator_category is a type convertible to the tag determined by +the following algorithm. Let C be traveral_category<Iterator>::type.

+
+if (reference is a reference to value_type) then
+    if (C is convertible to random_access_traversal_tag) then
+        random_access_iterator_tag
+    else if (C is convertible to bidirectional_traversal_tag) then
+        bidirectional_iterator_tag
+    else
+        forward_iterator_tag
+else
+    input_iterator_tag
+

indirect_iterator requirements

@@ -1337,7 +1349,7 @@ specified in the models section.

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.

+meet the 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 @@ -1486,9 +1498,20 @@ private: Iterator m_iterator; // exposition }; -

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

+

The iterator_category member is a type convertible to the iterator +tag given by the following algorithm. Let T be +iterator_traits<Iterator>::value_type, R be +iterator_traits<Iterator>::reference, and C be +traveral_category<Iterator>::type.

+
+if (R is a reference to T) then
+    if (C is convertible to random_access_traversal_tag) then
+        random_access_iterator_tag
+    else
+        bidirectional_iterator_tag
+else
+    input_iterator_tag
+

reverse_iterator requirements

@@ -1664,10 +1687,21 @@ private:

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. -The iterator_category member is a type convertible to the tags -corresponding to each standard concept modeled by -transform_iterator, as described in the models section.

+The value_type is remove_cv<remove_reference<reference> >::type.

+

The iterator_category member is a type convertible to the iterator +tag given by the following algorithm. Let C be +traveral_category<Iterator>::type.

+
+if (reference is a reference to value_type) then
+    if (C is convertible to random_access_traversal_tag) then
+        random_access_iterator_tag
+    else if (C is convertible to bidirectional_traversal_tag) then
+        bidirectional_iterator_tag
+    else
+        forward_iterator_tag
+else
+    input_iterator_tag
+

transform_iterator requirements

@@ -2098,9 +2132,8 @@ integral type. Otherwise difference_typeIf CategoryOrTraversal is not use_default then the member iterator_category is CategoryOrTraversal. Otherwise, if Incrementable is a numeric type then iterator_category is a -type convertible to random_access_traversal_tag and -random_access_iterator_tag. If Incrementable is not a numeric -type then iterator_category is +type convertible to random_access_iterator_tag. If +Incrementable is not a numeric type then iterator_category is iterator_traversal<Incrementable>::type.

[Note: implementers are encouraged to provide an implementation of
@@ -2312,7 +2345,7 @@ LocalWords: OtherIncrementable Coplien --> diff --git a/doc/indirect_iterator.html b/doc/indirect_iterator.html index cc3b052..b7f57df 100644 --- a/doc/indirect_iterator.html +++ b/doc/indirect_iterator.html @@ -116,7 +116,7 @@ else typedef Reference reference; if (Value is use_default) then - typedef ?? pointer; + typedef iterator_traits<V>::value_type* pointer; else typedef Value* pointer; @@ -125,9 +125,21 @@ if (Difference is use_default) else typedef Difference difference_type; -

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

+

If CategoryOrTraversal is not use_default then +iterator_category is CategoryOrTraversal. Otherwise +iterator_category is a type convertible to the tag determined by +the following algorithm. Let C be traveral_category<Iterator>::type.

+
+if (reference is a reference to value_type) then
+    if (C is convertible to random_access_traversal_tag) then
+        random_access_iterator_tag
+    else if (C is convertible to bidirectional_traversal_tag) then
+        bidirectional_iterator_tag
+    else
+        forward_iterator_tag
+else
+    input_iterator_tag
+

indirect_iterator requirements

@@ -135,7 +147,7 @@ specified in the models section.

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.

+meet the 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 @@ -315,7 +327,7 @@ a,b,c,d,e,f,g,

diff --git a/doc/indirect_iterator_ref.rst b/doc/indirect_iterator_ref.rst index ebe22ac..3124519 100644 --- a/doc/indirect_iterator_ref.rst +++ b/doc/indirect_iterator_ref.rst @@ -57,7 +57,7 @@ following pseudo-code. We use the abbreviation typedef Reference reference; if (Value is use_default) then - typedef ?? pointer; + typedef iterator_traits::value_type* pointer; else typedef Value* pointer; @@ -67,9 +67,24 @@ following pseudo-code. We use the abbreviation typedef Difference difference_type; -The member ``iterator_category`` is a type that satisfies the -requirements of the concepts modeled by the ``indirect_iterator`` as -specified in the models section. +If ``CategoryOrTraversal`` is not ``use_default`` then +``iterator_category`` is ``CategoryOrTraversal``. Otherwise +``iterator_category`` is a type convertible to the tag determined by +the following algorithm. Let ``C`` be ``traveral_category::type``. + +:: + + if (reference is a reference to value_type) then + if (C is convertible to random_access_traversal_tag) then + random_access_iterator_tag + else if (C is convertible to bidirectional_traversal_tag) then + bidirectional_iterator_tag + else + forward_iterator_tag + else + input_iterator_tag + + ``indirect_iterator`` requirements @@ -79,7 +94,7 @@ 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. +meet the requirements corresponding to the iterator tag. The expression ``*v``, where ``v`` is an object of type ``iterator_traits::value_type``, must be a valid expression diff --git a/doc/reverse_iterator.html b/doc/reverse_iterator.html index 53f4089..dd99e92 100644 --- a/doc/reverse_iterator.html +++ b/doc/reverse_iterator.html @@ -80,9 +80,20 @@ private: Iterator m_iterator; // exposition }; -

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

+

The iterator_category member is a type convertible to the iterator +tag given by the following algorithm. Let T be +iterator_traits<Iterator>::value_type, R be +iterator_traits<Iterator>::reference, and C be +traveral_category<Iterator>::type.

+
+if (R is a reference to T) then
+    if (C is convertible to random_access_traversal_tag) then
+        random_access_iterator_tag
+    else
+        bidirectional_iterator_tag
+else
+    input_iterator_tag
+

reverse_iterator requirements

@@ -266,7 +277,7 @@ sequence in double-reversed (normal) order: hello world! diff --git a/doc/reverse_iterator_ref.rst b/doc/reverse_iterator_ref.rst index b675250..b41769a 100644 --- a/doc/reverse_iterator_ref.rst +++ b/doc/reverse_iterator_ref.rst @@ -27,9 +27,22 @@ }; -The ``iterator_category`` member is a type convertible to the tags -corresponding to each standard concept modeled by -``reverse_iterator``, as described in the models section. +The ``iterator_category`` member is a type convertible to the iterator +tag given by the following algorithm. Let ``T`` be +``iterator_traits::value_type``, ``R`` be +``iterator_traits::reference``, and ``C`` be +``traveral_category::type``. + +:: + + if (R is a reference to T) then + if (C is convertible to random_access_traversal_tag) then + random_access_iterator_tag + else + bidirectional_iterator_tag + else + input_iterator_tag + ``reverse_iterator`` requirements diff --git a/doc/transform_iterator.html b/doc/transform_iterator.html index 5ce077c..c608fe2 100644 --- a/doc/transform_iterator.html +++ b/doc/transform_iterator.html @@ -90,10 +90,21 @@ private:

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. -The iterator_category member is a type convertible to the tags -corresponding to each standard concept modeled by -transform_iterator, as described in the models section.

+The value_type is remove_cv<remove_reference<reference> >::type.

+

The iterator_category member is a type convertible to the iterator +tag given by the following algorithm. Let C be +traveral_category<Iterator>::type.

+
+if (reference is a reference to value_type) then
+    if (C is convertible to random_access_traversal_tag) then
+        random_access_iterator_tag
+    else if (C is convertible to bidirectional_traversal_tag) then
+        bidirectional_iterator_tag
+    else
+        forward_iterator_tag
+else
+    input_iterator_tag
+

transform_iterator requirements

@@ -308,7 +319,7 @@ adding 4 to each element in the array: diff --git a/doc/transform_iterator_ref.rst b/doc/transform_iterator_ref.rst index 4df5ee7..6c9364f 100644 --- a/doc/transform_iterator_ref.rst +++ b/doc/transform_iterator_ref.rst @@ -38,9 +38,24 @@ The ``reference`` type of ``transform_iterator`` is ``result_of::reference)>::type``. The ``value_type`` is ``remove_cv >::type``. -The ``iterator_category`` member is a type convertible to the tags -corresponding to each standard concept modeled by -``transform_iterator``, as described in the models section. + +The ``iterator_category`` member is a type convertible to the iterator +tag given by the following algorithm. Let ``C`` be +``traveral_category::type``. + +:: + + if (reference is a reference to value_type) then + if (C is convertible to random_access_traversal_tag) then + random_access_iterator_tag + else if (C is convertible to bidirectional_traversal_tag) then + bidirectional_iterator_tag + else + forward_iterator_tag + else + input_iterator_tag + + ``transform_iterator`` requirements