diff options
author | Eric Fiselier <eric@efcs.ca> | 2017-10-30 18:59:59 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2017-10-30 18:59:59 +0000 |
commit | ddfdb32b302da2cf1b20d4c64444f9f58d5b8533 (patch) | |
tree | 829ddc8147e26bcb681722d8a9f2fe8bf1f34dd2 /libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy | |
parent | b81fbf44c7b0f8273210ef8aa34b5fefa4359dc4 (diff) | |
download | bcm5719-llvm-ddfdb32b302da2cf1b20d4c64444f9f58d5b8533.tar.gz bcm5719-llvm-ddfdb32b302da2cf1b20d4c64444f9f58d5b8533.zip |
Implement LWG 3013 - some filesystem members should not be noexcept.
LWG 3013 points out that the constructors and increment members
of the directory iterators need to allocate, and therefore cannot
be marked noexcept.
It also points out that `is_empty` and `copy` likely need to allocate
as well, and as such can also not be noexcept.
This patch speculatively implements the resolution removing noexcept,
because libc++ does indeed have the possibility of throwing on allocation
failure.
llvm-svn: 316941
Diffstat (limited to 'libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy')
-rw-r--r-- | libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy/copy.pass.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy/copy.pass.cpp b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy/copy.pass.cpp index c9b42b3596a..8f44e0d5a23 100644 --- a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy/copy.pass.cpp +++ b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy/copy.pass.cpp @@ -12,10 +12,10 @@ // <experimental/filesystem> // void copy(const path& from, const path& to); -// void copy(const path& from, const path& to, error_code& ec) noexcept; +// void copy(const path& from, const path& to, error_code& ec); // void copy(const path& from, const path& to, copy_options options); // void copy(const path& from, const path& to, copy_options options, -// error_code& ec) noexcept; +// error_code& ec); #include <experimental/filesystem> #include <type_traits> @@ -39,9 +39,9 @@ TEST_CASE(signature_test) std::error_code ec; ((void)ec); const copy_options opts{}; ((void)opts); ASSERT_NOT_NOEXCEPT(fs::copy(p, p)); - ASSERT_NOEXCEPT(fs::copy(p, p, ec)); + ASSERT_NOT_NOEXCEPT(fs::copy(p, p, ec)); ASSERT_NOT_NOEXCEPT(copy(p, p, opts)); - ASSERT_NOEXCEPT(copy(p, p, opts, ec)); + ASSERT_NOT_NOEXCEPT(copy(p, p, opts, ec)); } // There are 4 cases is the proposal for absolute path. |