On 22/05/19 23:14 +0100, Jonathan Wakely wrote:
PR libstdc++/90557 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix reversed arguments to uninitialized_copy_n. * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source is unchanged by copy assignment. * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to compare path components.
I should have used the three-argument version of std::equal, because the four-argument one is not available in C++11. Fixed with this patch, tested powerpc64le-linux and committed to trunk. This needs to be backported togcc-9-branch too.
commit ee46741a1ff05926900d655273ef7f84054e3f62 Author: Jonathan Wakely <jwak...@redhat.com> Date: Tue May 28 15:52:58 2019 +0100 Fix C++14-only code in testsuite utility * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument form of std::equals for C++11 compatibility. diff --git a/libstdc++-v3/testsuite/util/testsuite_fs.h b/libstdc++-v3/testsuite/util/testsuite_fs.h index b2a5ee6e655..fe42845ac4f 100644 --- a/libstdc++-v3/testsuite/util/testsuite_fs.h +++ b/libstdc++-v3/testsuite/util/testsuite_fs.h @@ -67,9 +67,9 @@ namespace __gnu_test throw test_fs::filesystem_error( "distance(begin1, end1) != distance(begin2, end2)", p1, p2, std::make_error_code(std::errc::invalid_argument) ); - if (!std::equal(p1.begin(), p1.end(), p2.begin(), p2.end())) + if (!std::equal(p1.begin(), p1.end(), p2.begin())) throw test_fs::filesystem_error( - "!equal(begin1, end1, begin2, end2)", p1, p2, + "!equal(begin1, end1, begin2)", p1, p2, std::make_error_code(std::errc::invalid_argument) ); }