Created on 2014-01-30.00:00:00 last changed 89 months ago
Proposed resolution:
Change 14 Class recursive_directory_iterator [class.rec.dir.itr]:
recursive_directory_iterator& increment(error_code& ec) noexcept;
Change 14.1 recursive_directory_iterator members [rec.dir.itr.members]:
recursive_directory_iterator& increment(error_code& ec) noexcept;
[ 21 May 2014 Beman Dawes reviewed all functions with error_code&
arguments,
and provided proposed wording for the one case found where the above guidelines were not met.
This was the case previously identified by Stephan T. Lavavej.
]
[ 2014-02-08: Daniel comments ]
All functions that return a path value such as canonical, current_path, read_symlink, system_complete, temp_directory_path, unique_path, or any member function returning a path value or basic_string value might legally throw an exception, if the allocator of the underlying string complains about insufficient memory. This is an anti-pattern for noexcept, because the exception-specification includes the return statement of a function and given the fact that the language currently does declare RVO as an optional action, we cannot rely on it.
The Standard is currently very careful not to specify functions as noexcept, if this case can happen, see e.g. std::locale::name(). To the contrary, enforcing them to be noexcept, would cause a similar problem as the unconditional noexcept specifier of the value-returning kill_dependency as denoted by LWG 2236. Basically this requirement conflicts with the section "Adopted Guidelines", second bullet of N3279.Addresses: filesys.ts
all functions with error_code arguments should be noexcept (see canonical, current_path, read_symlink, system_complete, temp_directory_path, unique_path, plus member functions).
[2014-02-03: Stephan T. Lavavej comments:]
The declaration and definition of "recursive_directory_iterator& increment(error_code& ec);" should almost certainly be marked noexcept.
History | |||
---|---|---|---|
Date | User | Action | Args |
2017-07-30 20:10:41 | admin | set | status: wp -> open |
2016-01-28 01:00:35 | admin | set | messages: + msg7823 |
2016-01-28 01:00:35 | admin | set | messages: + msg7822 |
2016-01-28 01:00:35 | admin | set | messages: + msg7821 |
2016-01-28 01:00:35 | admin | set | messages: + msg7820 |
2014-01-30 00:00:00 | admin | create |