This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/83025] [8 Regression] xfstream::open with char* gets caught on C++17 path overload.
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 17 Nov 2017 14:08:30 +0000
- Subject: [Bug libstdc++/83025] [8 Regression] xfstream::open with char* gets caught on C++17 path overload.
- Auto-submitted: auto-generated
- References: <bug-83025-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83025
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Fri Nov 17 14:07:58 2017
New Revision: 254871
URL: https://gcc.gnu.org/viewcvs?rev=254871&root=gcc&view=rev
Log:
PR libstdc++/83025 fix constraints for path overloads in <fstream>
PR libstdc++/83025
* include/std/fstream (basic_filebuf::_If_path): Move to
namespace-scope and rename to _If_fs_path.
(basic_filebuf::open): Use new name.
(basic_ifstream(_Path, ios::openmode))
(basic_ifstream::open(_Path, ios::openmode))
(basic_ofstream(_Path, ios::openmode))
(basic_ofstream::open(_Path, ios::openmode))
(basic_fstream(_Path, ios::openmode))
(basic_fstream::open(_Path, ios::openmode)): Use _If_fs_path.
* testsuite/27_io/basic_filebuf/open/char/path.cc: Test with filename
as non-const char*.
* testsuite/27_io/basic_fstream/cons/char/path.cc: Likewise.
* testsuite/27_io/basic_fstream/open/char/path.cc: Likewise.
* testsuite/27_io/basic_ifstream/cons/char/path.cc: Likewise.
* testsuite/27_io/basic_ifstream/open/char/path.cc: Likewise.
* testsuite/27_io/basic_ofstream/cons/char/path.cc: Likewise.
* testsuite/27_io/basic_ofstream/open/char/path.cc: Likewise.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/std/fstream
trunk/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/path.cc
trunk/libstdc++-v3/testsuite/27_io/basic_fstream/cons/char/path.cc
trunk/libstdc++-v3/testsuite/27_io/basic_fstream/open/char/path.cc
trunk/libstdc++-v3/testsuite/27_io/basic_ifstream/cons/char/path.cc
trunk/libstdc++-v3/testsuite/27_io/basic_ifstream/open/char/path.cc
trunk/libstdc++-v3/testsuite/27_io/basic_ofstream/cons/char/path.cc
trunk/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/path.cc