C++ Logo

std-proposals

Advanced search

Re: [std-proposals] [Draft] Typed and Safer Stream API for C++

From: Jonathan Wakely <cxx_at_[hidden]>
Date: Sun, 7 Sep 2025 15:41:57 +0100
And there's no need for any entirely new API to avoid accidentally passing
ios::out to an ifstream constructor. You could just add a new ifstream
constructor that takes std::constant_wrapper of a new enum type, or takes
new tag types.

This doesn't seem nearly important or useful enough to require an entirely
new API for opening files.

Received on 2025-09-07 14:42:16