r278869 - in /trunk/libstdc++-v3: ChangeLog inc...

redi@gcc.gnu.org redi@gcc.gnu.org
Sat Nov 30 01:03:00 GMT 2019


Author: redi
Date: Sat Nov 30 01:03:36 2019
New Revision: 278869

URL: https://gcc.gnu.org/viewcvs?rev=278869&root=gcc&view=rev
Log:
libstdc++: Fix experimental::filesystem::u8path(const Source&) for Windows

This function failed to compile when called with a std::string.

Also, constructing a path with a char8_t string did not correctly treat
the string as already UTF-8 encoded.

	* include/bits/fs_path.h (u8path(InputIterator, InputIterator))
	(u8path(const Source&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Simplify
	conditions.
	* include/experimental/bits/fs_path.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
	(__u8path(const Source&, char)): Add overloads for std::string and
	types convertible to std::string.
	(_Cvt::_S_wconvert): Add a new overload for char8_t strings and use
	codecvt_utf8_utf16 to do the correct conversion.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/bits/fs_path.h
    trunk/libstdc++-v3/include/experimental/bits/fs_path.h



More information about the Libstdc++-cvs mailing list