This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/78870] Support std::filesystem on Windows
- From: "development at jordi dot vilar.cat" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 04 Jun 2018 11:20:09 +0000
- Subject: [Bug libstdc++/78870] Support std::filesystem on Windows
- Auto-submitted: auto-generated
- References: <bug-78870-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78870
Jordi Vilar <development at jordi dot vilar.cat> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |development at jordi dot vilar.cat
--- Comment #17 from Jordi Vilar <development at jordi dot vilar.cat> ---
I think the patch is not including the required changes in <fstream> in order
to properly handle path arguments. Specifically, both constructors and methods
open() need an additional overload taking const wchar_t*, as required per
specs:
30.9.1 Header <fstream> synopsis
[...]
3 In this subclause, member functions taking arguments of const
filesystem::path::value_type* are only be provided on systems where
filesystem::path::value_type (30.10.7) is not char. [ Note: These
functions enable class path support for systems with a wide native path
character type, such as wchar_t.
—end note ]
This involves methods:
basic_filebuf::open(const filesystem::path::value_type* s, ios_base::openmode
mode);
explicit basic_ifstream::basic_ifstream(const filesystem::path::value_type* s,
ios_base::openmode mode = ios_base::in);
void basic_ifstream::open(const filesystem::path::value_type* s,
ios_base::openmode mode = ios_base::in);
explicit basic_ofstream::basic_ofstream(const filesystem::path::value_type* s,
ios_base::openmode mode = ios_base::out);
void basic_ofstream::open(const filesystem::path::value_type* s,
ios_base::openmode mode = ios_base::out);
explicit basic_fstream::basic_fstream(const std::filesystem::path::value_type*
s, ios_base::openmode mode = ios_base::in|ios_base::out);
void basic_fstream::open(const std::filesystem::path::value_type* s,
ios_base::openmode mode = ios_base::in|ios_base::out);
I hope this helps