476. Forward Iterator implied mutability

Section: 27.2.5 [forward.iterators] Status: NAD Submitter: Dave Abrahams Opened: 2004-07-09 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [forward.iterators].

View all issues with NAD status.


24.1/3 says:

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

The problem is that satisfying the requirements of output iterator means that you can always assign *something* into the result of dereferencing it. That makes almost all non-mutable forward iterators non-conforming. I think we need to sever the refinement relationship between forward iterator and output iterator.

Related issue: 200. But this is not a dup.

Proposed resolution:


Yes, 24.1/3 does say that. But it's introductory material. The precise specification is in 24.1.3, and the requrements table there is right. We don't need to fine-tune introductory wording. (Especially since this wording is likely to be changed as part of the iterator overhaul.)