aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2018-11-28 15:27:11 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2018-11-28 15:27:11 +0000
commit24d9b090fb4b9a260fedb4489392ebd509e93202 (patch)
tree7ddbccf4a6ee351ff8e14101617b9248b3e46049 /gcc
parent2b4be50093f6b2afb337bc7dded0274b46ce9b31 (diff)
downloadgcc-24d9b090fb4b9a260fedb4489392ebd509e93202.zip
gcc-24d9b090fb4b9a260fedb4489392ebd509e93202.tar.gz
gcc-24d9b090fb4b9a260fedb4489392ebd509e93202.tar.bz2
PR libstdc++/83306 make filesystem_error no-throw copyable
The class API provides no way to modify the members, so we can share them between copies of the same object. Copying becomes a simple reference count update, which doesn't throw. Also adjust the what() string to allow distinguishing between an empty path passed to the constructor, and no path. PR libstdc++/83306 * include/bits/fs_path.h (filesystem_error): Move data members into pimpl class owned by shared_ptr. Remove inline definitions of member functions. * src/filesystem/std-path.cc (filesystem_error::_Impl): Define. (filesystem_error): Define member functions. * testsuite/27_io/filesystem/filesystem_error/cons.cc: New test. * testsuite/27_io/filesystem/filesystem_error/copy.cc: New test. From-SVN: r266565
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions