Something about the docs doesn't make sense
https://en.cppreference.com/w/cpp/io/basic_filebuf/open.html
The file is opened as if by calling std::fopen with the second argument (file access mode) determined by the result of mode & ~std::ios_base::ate as follows, open() fails if the result is not some combination of flags shown in the table
->
Defined in header <cstdio>
std::FILE* fopen( const char* filename, const char* mode );
How is this possible???