<p>A few weeks back I was using std::ifstream to read in some files and it was failing immediately on open because the file was larger than 4GB. At the time I couldnt find a decent answer as to why it was limited to 32 bit files sizes, so I wrote my own using native OS API.</p>

<p>So, my question then: Is there a way to handle files greater than 4GB in size using std::ifstream/std::ostream (IE: standard c++)</p>

<p>EDIT: Using the STL implementation from the VC 9 compiler (Visual Studio 2008). 
EDIT2: Surely there has to be standard way to support file sizes larger than 4GB.</p>

Apparently it depends on how
```
off_t
```
is implemented by the library.
```
```
#include <streambuf>
__int64_t temp=std::numeric_limits<std::streamsize>::max();
```
```
gives you what the current max is.
STLport
supports larger files.