332. Consider adding increment and decrement operators to std::fpos< T >

Section: 30.5.4 [fpos] Status: NAD Submitter: PremAnand M. Rao Opened: 2001-08-27 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [fpos].

View all issues with NAD status.

Discussion:

Increment and decrement operators are missing from Table 88 -- Position type requirements in 30.5.4 [fpos].

Proposed resolution:

Table 88 (section 27.4.3) -- Position type requirements be updated to include increment and decrement operators.

expression        return type     operational    note

++p               fpos&           p += O(1)
p++               fpos            { P tmp = p;
                                    ++p;
                                    return tmp; }
--p               fpos&           p -= O(1)
p--               fpos            { P tmp = p;
                                    --p;
                                    return tmp; }

Rationale:

The LWG believes this is a request for extension, not a defect report. Additionally, nobody saw a clear need for this extension; fpos is used only in very limited ways.