public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r10-9556] libstdc++: Fix directory_iterator exception specification
@ 2021-03-29 20:00 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2021-03-29 20:00 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:347b75b72e1c9f4eb65e90489cb8aa4e738b9dee
commit r10-9556-g347b75b72e1c9f4eb65e90489cb8aa4e738b9dee
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue Oct 27 14:49:37 2020 +0000
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.
(cherry picked from commit 044b04348cfdc12848f1c6d5a8f45087c3075390)
Diff:
---
libstdc++-v3/src/c++17/fs_dir.cc | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/libstdc++-v3/src/c++17/fs_dir.cc b/libstdc++-v3/src/c++17/fs_dir.cc
index 784df2de53f..4932330de52 100644
--- a/libstdc++-v3/src/c++17/fs_dir.cc
+++ b/libstdc++-v3/src/c++17/fs_dir.cc
@@ -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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-29 20:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-29 20:00 [gcc r10-9556] libstdc++: Fix directory_iterator exception specification Jonathan Wakely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).