From 21381f3fa78d99dae3e4a3100b3446eca025fa08 Mon Sep 17 00:00:00 2001
From: Jeremy Siek
Date: Mon, 12 Jan 2004 19:54:57 +0000
Subject: [PATCH] removed constraints on reference from Readable Iterator
[SVN r21641]
---
doc/iter-issue-list.rst | 12 +++++++-----
doc/new-iter-concepts.html | 39 +++++++++++++++-----------------------
doc/new-iter-concepts.rst | 34 ++++++++++++++++-----------------
3 files changed, 38 insertions(+), 47 deletions(-)
diff --git a/doc/iter-issue-list.rst b/doc/iter-issue-list.rst
index 626991d..779f9f2 100644
--- a/doc/iter-issue-list.rst
+++ b/doc/iter-issue-list.rst
@@ -802,12 +802,14 @@ object. Is all this mechanism really necessary?
c++std-lib-12333:
N1550 requires that for a Readable Iterator a of type X, ``*a`` returns an object of type
- iterator_traits::reference. ``istreambuf_iterator::operator*`` returns charT, but
- istreambuf_iterator::reference is charT&. So am I overlooking something, or is
- istreambuf_iterator not Readable
+ ``iterator_traits::reference``. ``istreambuf_iterator::operator*`` returns ``charT``, but
+ ``istreambuf_iterator::reference`` is ``charT&``. So am I overlooking something, or is
+ ``istreambuf_iterator`` not Readable.
-:Proposed resolution: **Needs language** (Jeremy)
- Remove requirements on the reference type from Readable Iterator.
+:Proposed resolution:
+ Remove all constraints on ``iterator_traits::reference`` in Readable Iterator
+ and Lvalue Iterator. Change Lvalue Iterator to refer to ``T&`` instead of
+ ``iterator_traits::reference``.
diff --git a/doc/new-iter-concepts.html b/doc/new-iter-concepts.html
index 8e5c5a8..28c0280 100755
--- a/doc/new-iter-concepts.html
+++ b/doc/new-iter-concepts.html
@@ -384,24 +384,12 @@ type T.
Any non-reference,
non-cv-qualified type |
-iterator_traits<X>::reference |
-R, Convertible to
-T |
- |
-
*a |
-Convertible to R,
-Convertible to T |
+Convertible to T |
pre: a is
dereferenceable. If a
== b then *a is
-equivalent to *b |
-
-static_cast<T>(
-static_cast<R>(*a) ) |
-T |
-equivalent to
-static_cast<T>(*a) |
+equivalent to *b.
a->m |
U& |
@@ -411,10 +399,8 @@ to (*a).m
-
+
@@ -480,8 +466,9 @@ exchanged
-
The Lvalue Iterator concept adds the requirement that the
-reference type be a reference to the value type of the iterator.
+
The Lvalue Iterator concept adds the requirement that the return
+type of operator* type be a reference to the value type of the
+iterator.
@@ -493,16 +480,20 @@ exchanged
Expression |
Return Type |
-Assertion |
+Note/Assertion |
-iterator_traits<X>::reference |
+
*a |
T& |
T is cv
iterator_traits<X>::value_type
where cv is an optional
-cv-qualification |
+cv-qualification.
+pre: a is
+dereferenceable. If a
+== b then *a is
+equivalent to *b.
@@ -889,7 +880,7 @@ LocalWords: TraversalTag typename lvalues DWA Hmm JGS mis enum -->