gcc/libstdc++-v3/include/bits
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
..
algorithmfwd.h
alloc_traits.h
allocated_ptr.h
allocator.h Some libstdc++ fixes for -Wdeprecated-copy. 2018-05-18 16:02:14 -04:00
atomic_base.h
atomic_futex.h
basic_ios.h
basic_ios.tcc
basic_string.h PR libstdc++/84087 add default arguments to basic_string members (LWG 2268) 2018-05-03 16:01:20 +01:00
basic_string.tcc
boost_concept_check.h
c++0x_warning.h
c++config PR libstdc++/85729 add linkage specifications to headers 2018-05-10 13:35:45 +01:00
char_traits.h
codecvt.h
concept_check.h
cpp_type_traits.h
deque.tcc deque.tcc (deque<>::_M_assign_aux): Cast to void to ensure overloaded comma not used. 2018-05-02 19:51:33 +00:00
enable_special_members.h
forward_list.h
forward_list.tcc
fs_dir.h
fs_fwd.h
fs_ops.h
fs_path.h PR libstdc++/83891 fix path::is_absolute() for non-POSIX targets 2018-05-15 14:50:49 +01:00
fstream.tcc Add support for opening file streams from wide character strings 2018-05-21 18:18:35 +01:00
functexcept.h
functional_hash.h
gslice_array.h PR libstdc++/83860 avoid dangling references in valarray closure types 2018-05-02 17:41:46 +01:00
gslice.h
hashtable_policy.h
hashtable.h
indirect_array.h
invoke.h
ios_base.h PR libstdc++/68197 fail on negative iword/pword indices 2018-05-02 20:04:55 +01:00
istream.tcc
list.tcc deque.tcc (deque<>::_M_assign_aux): Cast to void to ensure overloaded comma not used. 2018-05-02 19:51:33 +00:00
locale_classes.h
locale_classes.tcc
locale_conv.h
locale_facets_nonio.h
locale_facets_nonio.tcc
locale_facets.h
locale_facets.tcc
localefwd.h
mask_array.h PR libstdc++/83860 avoid dangling references in valarray closure types 2018-05-02 17:41:46 +01:00
memoryfwd.h
move.h
node_handle.h PR libstdc++/82966 fix swapping of node handles 2018-05-14 15:27:54 +01:00
ostream_insert.h
ostream.tcc
parse_numbers.h
postypes.h
predefined_ops.h
ptr_traits.h
quoted_string.h
random.h PR libstdc++/85749 constrain seed sequences for random number engines 2018-05-15 16:36:46 +01:00
random.tcc PR libstdc++/85749 constrain seed sequences for random number engines 2018-05-15 16:36:46 +01:00
range_access.h
refwrap.h
regex_automaton.h PR libstdc++/85098 add missing definitions for static constants 2018-05-18 17:14:04 +01:00
regex_automaton.tcc
regex_compiler.h regex_compiler.h (_S_cache_size): Change from function to variable. 2018-05-10 15:12:23 -04:00
regex_compiler.tcc PR libstdc++/85098 add missing definitions for static constants 2018-05-18 17:14:04 +01:00
regex_constants.h
regex_error.h
regex_executor.h
regex_executor.tcc
regex_scanner.h
regex_scanner.tcc
regex.h PR libstdc++/85098 add missing definitions for static constants 2018-05-18 17:14:04 +01:00
regex.tcc
shared_ptr_atomic.h
shared_ptr_base.h
shared_ptr.h
slice_array.h PR libstdc++/83860 avoid dangling references in valarray closure types 2018-05-02 17:41:46 +01:00
specfun.h
sstream.tcc
std_abs.h PR libstdc++/85729 add linkage specifications to headers 2018-05-10 13:35:45 +01:00
std_function.h Make std::function tolerate semantically non-CopyConstructible objects 2018-05-09 14:28:11 +01:00
std_mutex.h
stl_algo.h
stl_algobase.h
stl_bvector.h deque.tcc (deque<>::_M_assign_aux): Cast to void to ensure overloaded comma not used. 2018-05-02 19:51:33 +00:00
stl_construct.h
stl_deque.h Some libstdc++ fixes for -Wdeprecated-copy. 2018-05-18 16:02:14 -04:00
stl_function.h PR libstdc++/85040 fix std::less<void> etc. ambiguities 2018-03-22 14:23:27 +00:00
stl_heap.h
stl_iterator_base_funcs.h
stl_iterator_base_types.h
stl_iterator.h Some libstdc++ fixes for -Wdeprecated-copy. 2018-05-18 16:02:14 -04:00
stl_list.h
stl_map.h re PR libstdc++/84998 (std::hash<std::bitset<N>> fails in Debug Mode) 2018-03-20 21:45:14 +00:00
stl_multimap.h re PR libstdc++/84998 (std::hash<std::bitset<N>> fails in Debug Mode) 2018-03-20 21:45:14 +00:00
stl_multiset.h re PR libstdc++/84998 (std::hash<std::bitset<N>> fails in Debug Mode) 2018-03-20 21:45:14 +00:00
stl_numeric.h
stl_pair.h
stl_queue.h
stl_raw_storage_iter.h
stl_relops.h
stl_set.h re PR libstdc++/84998 (std::hash<std::bitset<N>> fails in Debug Mode) 2018-03-20 21:45:14 +00:00
stl_stack.h
stl_tempbuf.h
stl_tree.h re PR libstdc++/85845 (Many libstdc++ test failures) 2018-05-21 16:51:47 +00:00
stl_uninitialized.h
stl_vector.h
stream_iterator.h
streambuf_iterator.h
streambuf.tcc
string_view.tcc
stringfwd.h
uniform_int_dist.h
unique_ptr.h
unordered_map.h re PR libstdc++/84998 (std::hash<std::bitset<N>> fails in Debug Mode) 2018-03-20 21:45:14 +00:00
unordered_set.h re PR libstdc++/84998 (std::hash<std::bitset<N>> fails in Debug Mode) 2018-03-20 21:45:14 +00:00
uses_allocator.h
valarray_after.h PR libstdc++/83860 avoid dangling references in valarray closure types 2018-05-02 17:41:46 +01:00
valarray_array.h Add __attribute__((malloc) to allocator and remove unused code 2018-05-14 16:35:12 +01:00
valarray_array.tcc
valarray_before.h PR libstdc++/83860 avoid dangling references in valarray closure types 2018-05-02 17:41:46 +01:00
vector.tcc deque.tcc (deque<>::_M_assign_aux): Cast to void to ensure overloaded comma not used. 2018-05-02 19:51:33 +00:00