From e7b5604ec50af821df08f78fc3df9abc7e8d2f4f Mon Sep 17 00:00:00 2001 From: Jeremy Siek Date: Tue, 13 Jan 2004 18:30:23 +0000 Subject: [PATCH] fixed a transform_iterator issue [SVN r21688] --- doc/facade-and-adaptor.html | 33 ++++++++++++++++----------------- doc/iter-issue-list.rst | 19 ++++++++++++++++++- doc/transform_iterator.html | 33 ++++++++++++++++----------------- doc/transform_iterator_ref.rst | 32 +++++++++++++++----------------- 4 files changed, 65 insertions(+), 52 deletions(-) diff --git a/doc/facade-and-adaptor.html b/doc/facade-and-adaptor.html index 12fc870..7156f62 100755 --- a/doc/facade-and-adaptor.html +++ b/doc/facade-and-adaptor.html @@ -1672,23 +1672,22 @@ private: UnaryFunction m_f; // exposition only }; -

The reference type of transform_iterator is +

If Reference is use_default then the reference member 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 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
-
+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.

+

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

@@ -2333,7 +2332,7 @@ LocalWords: OtherIncrementable Coplien --> diff --git a/doc/iter-issue-list.rst b/doc/iter-issue-list.rst index 0507567..d07d35a 100644 --- a/doc/iter-issue-list.rst +++ b/doc/iter-issue-list.rst @@ -1074,7 +1074,24 @@ c++std-lib-12641: been at this too long, and it's all turning into a maze of twisty passages, all alike. -:Proposed resolution: **Needs work** (Jeremy) +:Proposed resolution: + +Replace: + + The reference type of transform_iterator is + ``result_of::reference)>::type``. The + ``value_type`` is ``remove_cv >::type``. + +with: + + If ``Reference`` is ``use_default`` then the ``reference`` member of + ``transform_iterator`` is + ``result_of::reference)>::type``. + Otherwise, ``reference`` is ``Reference``. + + If ``Value`` is ``use_default`` then the ``value_type`` member is + ``remove_cv >::type``. Otherwise, + ``value_type`` is ``Value``. filter_iterator details unspecified diff --git a/doc/transform_iterator.html b/doc/transform_iterator.html index 1adda01..f606318 100644 --- a/doc/transform_iterator.html +++ b/doc/transform_iterator.html @@ -88,23 +88,22 @@ private: UnaryFunction m_f; // exposition only }; -

The reference type of transform_iterator is +

If Reference is use_default then the reference member 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 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
-
+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.

+

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

@@ -319,7 +318,7 @@ adding 4 to each element in the array: diff --git a/doc/transform_iterator_ref.rst b/doc/transform_iterator_ref.rst index 6c9364f..8fde050 100644 --- a/doc/transform_iterator_ref.rst +++ b/doc/transform_iterator_ref.rst @@ -35,27 +35,25 @@ }; -The ``reference`` type of ``transform_iterator`` is +If ``Reference`` is ``use_default`` then the ``reference`` member of +``transform_iterator`` is ``result_of::reference)>::type``. -The ``value_type`` is ``remove_cv >::type``. +Otherwise, ``reference`` is ``Reference``. -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 +If ``Value`` is ``use_default`` then the ``value_type`` member is +``remove_cv >::type``. Otherwise, +``value_type`` is ``Value``. +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