988b853f9c
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. |
||
---|---|---|
.. | ||
17_intro | ||
18_support | ||
19_diagnostics | ||
20_util | ||
21_strings | ||
22_locale | ||
23_containers | ||
24_iterators | ||
25_algorithms | ||
26_numerics | ||
27_io | ||
28_regex | ||
29_atomics | ||
30_threads | ||
abi | ||
backward | ||
config | ||
data | ||
decimal | ||
experimental | ||
ext | ||
lib | ||
libstdc++-abi | ||
libstdc++-dg | ||
libstdc++-prettyprinters | ||
libstdc++-xmethods | ||
performance | ||
special_functions | ||
std | ||
tr1 | ||
tr2 | ||
util | ||
Makefile.am | ||
Makefile.in |