Title
[filesys.ts] [PDTS] Make certain functions noexcept and drop error_code version
Status
nad
Section
[directory_entry.obs] [fs.op.exists] [fs.op.is_block_file] [fs.op.is_char_file] [fs.op.is_directory] [fs.op.is_empty] [fs.op.is_fifo] [fs.op.is_other] [fs.op.is_regular_file] [fs.op.is_socket] [fs.op.is_symlink] [fs.op.status] [fs.op.symlink_status] [fs.op.unique_path]
Submitter
P.J. Plauger

Created on 2014-01-30.00:00:00 last changed 108 months ago

Messages

Date: 2016-01-28.01:00:35

[ 17 Jun 2014 Rapperswil LWG closes as NAD. Working paper correct as written. ]

Date: 2016-01-28.01:00:35

[ Beman Dawes 2014-02-27 ]

Issues 2637, 2638, 2641, and 2649 are concerned with signatures which should or should not be noexcept. I will provide unified proposed wording for these issues, possibly in a separate paper.

Date: 2014-02-08.00:00:00

[ 2014-02-08: Daniel comments ]

unique_path(const path&) cannot be declared as noexcept, because it returns an object during whose construction a memory allocation request may fail, see the rationale provided in 2637.

exists(const path&) and the is_*(const path&) functions cannot be noexcept, because they are specified in terms of status(const path&), which again may throw an exception, which is explicitly described in the Effects (filesystem_error), because the non-throwing function (status(const path&, error_code&)) may fail to satisfy the request.

symlink_status(const path&) may throw an exception for similar reasons that status(const path&) could fail.

The reference to file_status::status()/symlink_status() looks like a typo to me (there are no such functions in file_status), presumably directory_entry::status()/symlink_status() was meant. In this case I see no reason how these could be marked as noexcept, because these functions all may fail and may throw an exception.

Based on this interpretation of the issue discussion I recommend to resolve this issue as NAD.

Date: 2016-01-31.20:31:05

Addresses: filesys.ts

exists(const path&) should be noexcept (drop error_code version).
is_*(const path&) should be noexcept (drop error_code version).
status(const path&) should be noexcept (drop error_code version).
symlink_status(const path&) should be noexcept (drop error_code version).
file_status::status() should be noexcept (drop error_code version).
file_status::symlink_status() should be noexcept (drop error_code version).
unique_path(const path&) should be noexcept (drop error_code version).

History
Date User Action Args
2016-01-28 01:00:35adminsetmessages: + msg7827
2016-01-28 01:00:35adminsetmessages: + msg7826
2016-01-28 01:00:35adminsetmessages: + msg7825
2014-01-30 00:00:00admincreate