PR libstdc++/90557 fix path assignment that alters source
authorJonathan Wakely <jwakely@redhat.com>
Wed, 22 May 2019 22:14:34 +0000 (23:14 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 22 May 2019 22:14:34 +0000 (23:14 +0100)
commitf9b22a0c24235d72cf78e70c64bcf695f1f6b3f7
tree5e8c520f2c788fa9b41b914b291fe2ba461f955b
parent7039cebfa8da3e6309bf1792ca063497257edcd8
PR libstdc++/90557 fix path assignment that alters source

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.

From-SVN: r271527
libstdc++-v3/ChangeLog
libstdc++-v3/src/c++17/fs_path.cc
libstdc++-v3/testsuite/27_io/filesystem/path/assign/copy.cc
libstdc++-v3/testsuite/util/testsuite_fs.h