1212. result of post-increment/decrement operator

Section: 27.2 [iterator.requirements] Status: Resolved Submitter: Alisdair Meredith Opened: 2009-09-18 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [iterator.requirements].

View all issues with Resolved status.

Discussion:

Forward iterator and bidirectional iterator place different requirements on the result of post-increment/decrement operator. The same form should be used in each case.

Merging row from:

Table 102 -- Forward iterator requirements
Table 103 -- Bidirectional iterator requirements

    r++ : convertible to const X&
    r-- : convertible to const X&
    
    *r++ : T& if X is mutable, otherwise const T&
    *r-- : convertible to T

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

Rationale:

Solved by N3066.

Proposed resolution: