gcc/libstdc++-v3/testsuite
Jonathan Wakely b02923592a Add support for opening file streams from wide character strings
C++17 added new overloads to <fstream> class templates to support
opening files from wide character strings "on systems where
filesystem::path::value_type is not char". This patch adds those
overloads conditional on _wfopen being available, and enables them for
pre-C++17 modes as well.

	Add support for opening file streams from wide character strings.
	* config/io/basic_file_stdio.cc [_GLIBCXX_HAVE__WFOPEN]
	(__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
	Define new overload.
	* config/io/basic_file_stdio.h [_GLIBCXX_HAVE__WFOPEN]
	(__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
	Declare new overload.
	* configure.ac: Check for _wfopen.
	* crossconfig.m4: Likewise.
	* configure: Regenerate.
	* config.h.in: Regenerate.
	* include/bits/fstream.tcc [_GLIBCXX_HAVE__WFOPEN]
	(basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
	Define new overload.
	* include/std/fstream [_GLIBCXX_HAVE__WFOPEN]
	(basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
	Declare new overload.
	[_GLIBCXX_HAVE__WFOPEN]
	(basic_ifstream<C,T>::basic_ifstream(const wchar_t*, openmode))
	(basic_ifstream<C,T>::basic_open(const wchar_t*, openmode))
	(basic_ofstream<C,T>::basic_ifstream(const wchar_t*, openmode))
	(basic_ofstream<C,T>::basic_open(const wchar_t*, openmode))
	(basic_fstream<C,T>::basic_ifstream(const wchar_t*, openmode))
	(basic_fstream<C,T>::basic_open(const wchar_t*, openmode)): Define
	new overloads.
	* testsuite/27_io/basic_filebuf/open/wchar_t/1.cc: New.
	* testsuite/27_io/basic_ifstream/cons/wchar_t/1.cc: New.
	* testsuite/27_io/basic_ifstream/open/wchar_t/1.cc: New.
	* testsuite/27_io/basic_ofstream/cons/wchar_t/1.cc: New.
	* testsuite/27_io/basic_ofstream/open/wchar_t/1.cc: New.
	* testsuite/27_io/basic_fstream/cons/wchar_t/1.cc: New.
	* testsuite/27_io/basic_fstream/open/wchar_t/1.cc: New.

From-SVN: r260479
2018-05-21 18:18:35 +01:00
..
17_intro
18_support
19_diagnostics
20_util re PR libstdc++/80165 (Constexpr tuple of variant doesn't work) 2018-05-13 13:36:12 +03:00
21_strings PR libstdc++/84087 add default arguments to basic_string members (LWG 2268) 2018-05-03 16:01:20 +01:00
22_locale Fix std::codecvt_utf8<wchar_t> for Mingw 2018-05-19 03:03:42 +01:00
23_containers 2018-05-18 François Dumont <fdumont@gcc.gnu.org> 2018-05-18 20:49:49 +00:00
24_iterators safe_iterator.h (_Safe_iterator<>::_M_constant()): Rename in... 2018-05-09 20:04:46 +00:00
25_algorithms
26_numerics PR libstdc++/85749 constrain seed sequences for random number engines 2018-05-15 16:36:46 +01:00
27_io Add support for opening file streams from wide character strings 2018-05-21 18:18:35 +01:00
28_regex PR libstdc++/85098 add missing definitions for static constants 2018-05-18 17:14:04 +01:00
29_atomics
30_threads PR libstdc++/84535 constrain std::thread constructor 2018-05-03 15:08:36 +01:00
abi
backward
config
data
decimal
experimental PR libstdc++/85818 make new test require Filesystem support 2018-05-21 13:27:00 +01:00
ext PR libstdc++/85749 constrain seed sequences for random number engines 2018-05-15 16:36:46 +01:00
lib
libstdc++-abi
libstdc++-dg
libstdc++-prettyprinters
libstdc++-xmethods
performance
special_functions PR libstdc++/83140 - assoc_legendre returns negated value when m is odd 2018-05-10 13:59:52 +00:00
tr1 ...and actually resture the *new* testcase. 2018-05-11 17:38:26 +00:00
tr2
util
Makefile.am
Makefile.in