This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++17 status.
Section: 28.11.12 [fs.class.directory_iterator], 28.11.13 [fs.class.rec.dir.itr] Status: C++17 Submitter: Eric Fiselier Opened: 2016-05-28 Last modified: 2019-01-01
View all issues with C++17 status.
Constructing or performing an increment on directory iterator types can result in an error. Currently there is implementation divergence regarding the value of the iterator after an error occurs. Both boost and libc++ construct the end iterator. libstdc++ constructs a singular iterator which is not equal to the end iterator. For this reason we should clarify the state of the iterators after an error occurs.
Moved to P0/Ready during issues prioritization.
Friday: status to Immediate
This wording is relative to N4582.
Modify 28.11.12 [fs.class.directory_iterator] as follows:
-3- If an iterator of type directory_iterator is advanced past the last directory element, that iterator shall become equal to the end iterator value. The directory_iterator default constructor shall create an iterator equal to the end iterator value, and this shall be the only valid iterator for the end condition.