Created on 2017-08-23.00:00:00 last changed 45 months ago
Proposed resolution:
This wording is relative to N4687.
Edit [fs.filesystem.syn], header <filesystem> synopsis, as indicated:
namespace std::filesystem { […] bool copy_file(const path& from, const path& to); bool copy_file(const path& from, const path& to, error_code& ec)noexcept; bool copy_file(const path& from, const path& to, copy_options option); bool copy_file(const path& from, const path& to, copy_options option, error_code& ec)noexcept; […] bool create_directories(const path& p); bool create_directories(const path& p, error_code& ec)noexcept; […] uintmax_t remove_all(const path& p); uintmax_t remove_all(const path& p, error_code& ec)noexcept; […] }
Edit [fs.op.copy_file] as indicated:
bool copy_file(const path& from, const path& to); bool copy_file(const path& from, const path& to, error_code& ec)noexcept;-1- Returns: […]
-2- Throws: […]bool copy_file(const path& from, const path& to, copy_options options); bool copy_file(const path& from, const path& to, copy_options options, error_code& ec)noexcept;-3- Requires: […]
-4- Effects: […] -5- Returns: […] -6- Throws: […] -7- Complexity: […]
Edit [fs.op.create_directories] as indicated:
bool create_directories(const path& p); bool create_directories(const path& p, error_code& ec)noexcept;-1- Effects: […]
-2- Postconditions: […] -3- Returns: […] -4- Throws: […] -5- Complexity: […]
Edit [fs.op.remove_all] as indicated:
uintmax_t remove_all(const path& p); uintmax_t remove_all(const path& p, error_code& ec)noexcept;-1- Effects: […]
-2- Postconditions: […] -3- Returns: […] -4- Throws: […]
[ 2018-3-17 Adopted in Jacksonville ]
[ 2017-11 Albuquerque Wednesday night issues processing ]
Moved to Ready
create_directories may need to create temporary paths, and remove_all may need to create temporary paths and/or directory_iterators. These operations may require a potentially throwing memory allocation.
Implementations of copy_file may wish to dynamically allocate the buffer used for copying when the underlying OS doesn't supply a copy API directly. This can happen indirectly, e.g., by using <fstream> facilities to perform the copying without supplying a custom buffer. Unless LWG wishes to prohibit using a dynamically allocated buffer in this manner, the noexcept should be removed.History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2018-03-18 16:03:30 | admin | set | messages: + msg9741 |
2018-03-18 16:03:30 | admin | set | status: voting -> wp |
2018-02-12 01:13:49 | admin | set | status: ready -> voting |
2017-11-09 15:13:04 | admin | set | messages: + msg9516 |
2017-11-09 15:13:04 | admin | set | status: new -> ready |
2017-08-27 13:39:11 | admin | set | messages: + msg9453 |
2017-08-23 00:00:00 | admin | create |