Title
Iterator categories and output iterators
Status
resolved
Section
[iterator.requirements]
Submitter
Alisdair Meredith

Created on 2009-07-31.00:00:00 last changed 171 months ago

Messages

Date: 2010-10-21.18:28:33

Rationale:

Solved by N3066.

Date: 2010-12-05.00:09:22

[ 2010 Pittsburgh: Moved to NAD EditorialResolved. Rationale added below. ]

Date: 2009-07-31.00:00:00

(wording relative to N2723 pending new working paper)

According to p3 [iterator.requirements], Forward iterators, Bidirectional iterators and Random Access iterators all satisfy the requirements for an Output iterator:

XXX iterators satisfy all the requirements of the input and output iterators and can be used whenever either kind is specified ...

Meanwhile, p4 goes on to contradict this:

Besides its category, a forward, bidirectional, or random access iterator can also be mutable or constant...

... Constant iterators do not satisfy the requirements for output iterators

The latter seems to be the overriding concern, as the iterator tag hierarchy does not define forward_iterator_tag as multiply derived from both input_iterator_tag and output_iterator_tag.

The work on concepts for iterators showed us that output iterator really is fundamentally a second dimension to the iterator categories, rather than part of the linear input -> forward -> bidirectional -> random-access sequence. It would be good to clear up these words to reflect that, and separately list output iterator requirements in the requires clauses for the appropriate algorithms and operations.

History
Date User Action Args
2010-12-05 00:09:22adminsetstatus: nad editorial -> resolved
2010-10-21 18:28:33adminsetmessages: + msg1059
2010-10-21 18:28:33adminsetmessages: + msg1058
2009-07-31 00:00:00admincreate