[libcxx-commits] [libcxx] [libc++] Implement LWG3430 disallow implicit conversion of the source arguments to `std::filesystem::path` when constructing `std::basic_*fstream` (PR #85079)

Jonathan Wakely via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 2 06:58:24 PDT 2024


jwakely wrote:

> After reading the LWG issue, my understanding is that the intended usage is to instead construct a `std::string` explicitly when passing it to the `std::fstream` so as to explicitly call out that we're creating a null-terminated string. Is that correct?

Yes. That was the intended usage, which was then broken by adding `filesystem::path` which allowed an implicit (but expensive) conversion.

https://github.com/llvm/llvm-project/pull/85079


More information about the libcxx-commits mailing list