https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71005

            Bug ID: 71005
           Summary: recursive_directory_iterator::operator++(int)
                    incorrectly implemented
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eric at efcs dot ca
  Target Milestone: ---

Hi Jonathan,

The postfix increment operator returns the incremented value of the iterator,
not the previous one.

For example:

directory_iterator it(".");
path elem = *it;
path elem2 = *it++;
assert(elem == elem2); // fires

Reply via email to