This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD status.

### 573. C++0x file positioning should handle modern file sizes

Section: 29.5.3 [fpos] Status: NAD Submitter: Beman Dawes Opened: 2006-04-12 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [fpos].

View all issues with NAD status.

Discussion:

There are two deficiencies related to file sizes:

1. It doesn't appear that the Standard Library is specified in a way that handles modern file sizes, which are often too large to be represented by an unsigned long.
2. The `std::fpos` class does not currently have the ability to set/get file positions.

The Dinkumware implementation of the Standard Library as shipped with the Microsoft compiler copes with these issues by:

1. Defining `fpos_t` be `long long`, which is large enough to represent any file position likely in the foreseeable future.
2. Adding member functions to class `fpos`. For example,

   >     fpos_t seekpos() const;

Because there are so many types relating to file positions and offsets (`fpos_t`, `fpos`, `pos_type`, `off_type`, `streamoff`, `streamsize`, `streampos`, `wstreampos`, and perhaps more), it is difficult to know if the Dinkumware extensions are sufficient. But they seem a useful starting place for discussions, and they do represent existing practice.

[ Kona (2007): We need a paper. It would be nice if someone proposed clarifications to the definitions of `pos_type` and `off_type`. Currently these definitions are horrible. Proposed Disposition: Open ]

[ 2009-07 Frankfurt ]

> This is the subject of paper N2926.

> If we choose to take any action, we will move the paper, so the issue can be closed.

> Move to NAD.

Proposed resolution: