gcc/libstdc++-v3/testsuite/27_io/filesystem
Jonathan Wakely 988b853f9c libstdc++: Simplify filesystem::path SFINAE constraints
This replaces the filesystem::__detail::_Path SFINAE helper with two
separate helpers, _Path and _Path2. This avoids having one helper which
tries to check two different sets of requirements.

The _Path helper now uses variable templates instead of a set of
overloaded functions to detect specializations of basic_string or
basic_string_view.

The __not_<is_void<remove_pointer_t<_Tp1>> check is not necessary in
C++20 because iterator_traits<void*> is now empty. For C++17 replace
that check with a __safe_iterator_traits helper with partial
specializations for void pointers.

Finally, the __is_encoded_char check no longer uses remove_const_t,
which means that iterators with a const value_type will no longer be
accepted as arguments for path creation. Such iterators resulted in
undefined behaviour anyway, so it's still conforming to reject them in
the constraint checks.

	* include/bits/fs_path.h (filesystem::__detail::__is_encoded_char):
	Replace alias template with variable template. Don't remove const.
	(filesystem::__detail::__is_path_src): Replace overloaded function
	template with variable template and specializations.
	(filesystem::__detail::__is_path_iter_src): Replace alias template
	with class template.
	(filesystem::__detail::_Path): Use __is_path_src. Remove support for
	iterator pairs.
	(filesystem::__detail::_Path2): New alias template for checking
	InputIterator requirements.
	(filesystem::__detail::__constructible_from): Remove.
	(filesystem::path): Replace _Path<Iter, Iter> with _Path2<Iter>.
	* testsuite/27_io/filesystem/path/construct/80762.cc: Check with two
	constructor arguments of void and void* types.
2020-05-23 09:40:16 +01:00
..
directory_entry Update copyright years. 2020-01-01 12:51:42 +01:00
file_status Update copyright years. 2020-01-01 12:51:42 +01:00
filesystem_error Update copyright years. 2020-01-01 12:51:42 +01:00
iterators Update copyright years. 2020-01-01 12:51:42 +01:00
operations libstdc++: Fix some warnings in filesystem tests 2020-03-05 17:23:44 +00:00
path libstdc++: Simplify filesystem::path SFINAE constraints 2020-05-23 09:40:16 +01:00