gcc/libstdc++-v3/testsuite/experimental
Jonathan Wakely 1dfd95f0a0 libstdc++: Fix filesystem::rename on Windows [PR 98985]
The _wrename function won't overwrite an existing file, so use
MoveFileEx instead. That allows renaming directories over files, which
POSIX doesn't allow, so check for that case explicitly and report an
error.

Also document the deviation from the expected behaviour, and add a test
for filesystem::rename which was previously missing.

The Filesystem TS experimental::filesystem::rename doesn't have that
extra code to handle directories correctly, so the relevant parts of the
new test are not run on Windows.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2014.xml: Document implementation
	specific properties of std::experimental::filesystem::rename.
	* doc/xml/manual/status_cxx2017.xml: Document implementation
	specific properties of std::filesystem::rename.
	* doc/html/*: Regenerate.
	* src/c++17/fs_ops.cc (fs::rename): Implement correct behaviour
	for directories on Windows.
	* src/filesystem/ops-common.h (__gnu_posix::rename): Use
	MoveFileExW on Windows.
	* testsuite/27_io/filesystem/operations/rename.cc: New test.
	* testsuite/experimental/filesystem/operations/rename.cc: New test.
2021-02-12 15:29:50 +00:00
..
algorithm Update copyright years. 2021-01-04 10:26:59 +01:00
any Update copyright years. 2021-01-04 10:26:59 +01:00
array Update copyright years. 2021-01-04 10:26:59 +01:00
chrono Update copyright years. 2021-01-04 10:26:59 +01:00
deque Update copyright years. 2021-01-04 10:26:59 +01:00
filesystem libstdc++: Fix filesystem::rename on Windows [PR 98985] 2021-02-12 15:29:50 +00:00
forward_list Update copyright years. 2021-01-04 10:26:59 +01:00
functional Update copyright years. 2021-01-04 10:26:59 +01:00
iterator Update copyright years. 2021-01-04 10:26:59 +01:00
list Update copyright years. 2021-01-04 10:26:59 +01:00
map Update copyright years. 2021-01-04 10:26:59 +01:00
memory Update copyright years. 2021-01-04 10:26:59 +01:00
memory_resource Update copyright years. 2021-01-04 10:26:59 +01:00
net libstdc++: Include scope ID in net::internet::address_v6::to_string() 2021-02-12 15:08:29 +00:00
numeric Update copyright years. 2021-01-04 10:26:59 +01:00
optional Update copyright years. 2021-01-04 10:26:59 +01:00
polymorphic_allocator Update copyright years. 2021-01-04 10:26:59 +01:00
propagate_const Update copyright years. 2021-01-04 10:26:59 +01:00
random Update copyright years. 2021-01-04 10:26:59 +01:00
ratio Update copyright years. 2021-01-04 10:26:59 +01:00
set Update copyright years. 2021-01-04 10:26:59 +01:00
simd libstc++: Implement hmin and hmax 2021-02-03 15:49:30 +00:00
source_location Update copyright years. 2021-01-04 10:26:59 +01:00
string Update copyright years. 2021-01-04 10:26:59 +01:00
string_view Update copyright years. 2021-01-04 10:26:59 +01:00
system_error Update copyright years. 2021-01-04 10:26:59 +01:00
tuple Update copyright years. 2021-01-04 10:26:59 +01:00
type_erased_allocator Update copyright years. 2021-01-04 10:26:59 +01:00
type_traits Update copyright years. 2021-01-04 10:26:59 +01:00
unordered_map Update copyright years. 2021-01-04 10:26:59 +01:00
unordered_set Update copyright years. 2021-01-04 10:26:59 +01:00
vector Update copyright years. 2021-01-04 10:26:59 +01:00
feat-char8_t.cc
feat-cxx14.cc
feat-lib-fund.cc libstdc++: Fix errors from Library Fundamentals TS headers in C++11 [PR 98319] 2020-12-16 13:37:17 +00:00
names.cc Update copyright years. 2021-01-04 10:26:59 +01:00