From -5378702873496223566
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,16c102c32134aea8,start
X-Google-Attributes: gidf78e5,public
From: scleary@jerviswebb.com
Subject: Defect Report: Unnecessary restriction on past-the-end iterators
Date: 2000/02/03
Message-ID: <538B4E4235ECD211B35B0090273CC28B012E28@CECEXCHANGE>#1/1
X-Deja-AN: 581159539
Content-Transfer-Encoding: 7bit
Approved: stephen.clamage@sun.com (comp.std.c++)
X-UID: 0000000001
X-Priority: 3 (Normal)
X-Status: $$$T
Content-Type: text/plain; charset="iso-8859-1"
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Importance: Normal
Organization: -
X-MSMail-Priority: Normal
Mime-Version: 1.0
Reply-To: <scleary@jerviswebb.com>
Newsgroups: comp.std.c++
Originator: clamage@taumet


[Moderator's note: forwarded to C++ Committee. -sdc ]

Unnecessary restriction on past-the-end iterators

Section: 24.1 [Iterator requirements]
Submitter: Stephen Cleary
Date: 02 February 2000

In 24.1 [Iterator requirements] paragraph 5, it is stated ". . .
Dereferenceable and past-the-end values are always non-singular."

This places an unnecessary restriction on past-the-end iterators for
containers with forward iterators (for example, a singly-linked list).  If
the past-the-end value on such a container was a well-known singular value,
it would still satisfy all forward iterator requirements.

Removing this restriction would allow, for example, a singly-linked list
without a "footer" node.

This would have an impact on existing code that expects past-the-end
iterators obtained from different (generic) containers being not equal.

Proposed Resolution:
Change the wording of 24.1 [Iterator requirements] paragraph 5 to ". . .
Dereferenceable values are always non-singular.  If the iterator category is
bidirectional or random access, a past-the-end value of that iterator is
always non-singular."

	-Steve



[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]




