Title
Do directory_iterator and recursive_directory_iterator become the end iterator upon error?
Status
c++17
Section
[fs.class.directory.iterator][fs.class.rec.dir.itr]
Submitter
Eric Fiselier

Created on 2016-05-28.00:00:00 last changed 90 months ago

Messages

Date: 2017-03-19.19:35:20

Proposed resolution:

This wording is relative to N4582.

  1. Modify [fs.class.directory_iterator] as follows:

    -3- If an iterator of type directory_iterator reports an error or 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.

Date: 2016-06-27.16:42:33

[ 2016-06 Oulu ]

Moved to P0/Ready during issues prioritization.

Friday: status to Immediate

Date: 2016-05-28.00:00:00

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.

History
Date User Action Args
2017-07-30 20:15:43adminsetstatus: wp -> c++17
2016-06-28 13:14:43adminsetstatus: immediate -> wp
2016-06-27 16:42:33adminsetstatus: ready -> immediate
2016-06-21 17:05:07adminsetmessages: + msg8191
2016-06-20 16:35:58adminsetstatus: new -> ready
2016-06-05 18:47:01adminsetmessages: + msg8168
2016-05-28 00:00:00admincreate