libstdc++: Fix directory_iterator exception specification
libstdc++-v3/ChangeLog: * src/c++17/fs_dir.cc (fs::directory_iterator::operator*): Add noexcept. Do not throw on precondition violation.
This commit is contained in:
parent
fe9d058ca2
commit
044b04348c
@ -148,12 +148,8 @@ directory_iterator(const path& p, directory_options options, error_code* ecptr)
|
||||
}
|
||||
|
||||
const fs::directory_entry&
|
||||
fs::directory_iterator::operator*() const
|
||||
fs::directory_iterator::operator*() const noexcept
|
||||
{
|
||||
if (!_M_dir)
|
||||
_GLIBCXX_THROW_OR_ABORT(filesystem_error(
|
||||
"non-dereferenceable directory iterator",
|
||||
std::make_error_code(errc::invalid_argument)));
|
||||
return _M_dir->entry;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user