Title
Error reporting for recursive_directory_iterator::pop() is under-specified
Status
c++17
Section
[fs.class.rec.dir.itr]
Submitter
Eric Fiselier

Created on 2016-05-09.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. Change [fs.class.rec.dir.itr], class recursive_directory_iterator synopsis, as indicated:

    namespace std::filesystem {
      class recursive_directory_iterator {
      public:
        […]
        void pop();
        void pop(error_code& ec);
        void disable_recursion_pending();
        […]
      };
    }
    
  2. Change [fs.rec.dir.itr.members] as indicated:

    void pop();
    void pop(error_code& ec);
    

    -30- Requires: *this != recursive_directory_iterator().

    -31- Effects: If depth() == 0, set *this to recursive_directory_iterator(). Otherwise, cease iteration of the directory currently being iterated over, and continue iteration over the parent directory.

    -?- Throws: As specified in Error reporting ([error.reporting]).

Date: 2016-05-09.00:00:00

Unlike increment, pop() does not specify how it reports errors nor does it provide a std::error_code overload. However implementing pop() all but requires performing an increment, so it should handle errors in the same way.

History
Date User Action Args
2017-07-30 20:15:43adminsetstatus: wp -> c++17
2016-06-28 12:50:44adminsetstatus: ready -> wp
2016-05-22 15:38:38adminsetstatus: new -> ready
2016-05-10 19:52:12adminsetmessages: + msg8111
2016-05-09 00:00:00admincreate