On Sat, 6 Sept 2025 at 12:06, Jerome Saint-Martin via Std-Proposals <std-proposals@lists.isocpp.org> wrote:
Problem
The current ifstream/ofstream API allows illogical mode combinations:
  std::ifstream f("data.txt", std::ios::out); // Compiles, but doesn't work
What doesn't work here?

The filebuf is opened with mode ios::out|ios::in and so reading from the ifstream works fine.

See https://eel.is/c++draft/ifstream.cons#2.sentence-1