Make filesystem::path safe for self assignment
The standard says "If *this and p are the same object, has no effect." Previously we ended up clearing the path. * include/bits/fs_path.h (path::operator=(path&&)): Check for self assignment. * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise. * testsuite/27_io/filesystem/path/assign/copy.cc: Test self assignment. From-SVN: r270171
Showing
Please
register
or
sign in
to comment