https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71005
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- Author: redi Date: Wed May 25 15:44:33 2016 New Revision: 236722 URL: https://gcc.gnu.org/viewcvs?rev=236722&root=gcc&view=rev Log: libstdc++/71005 fix post-increment for filesystem iterators Backport from mainline 2016-05-10 Jonathan Wakely <jwak...@redhat.com> PR libstdc++/71005 * include/experimental/bits/fs_dir.h (__directory_iterator_proxy): New type. (directory_iterator::operator++(int)): Return proxy. (recursive_directory_iterator::operator++(int)): Likewise. * testsuite/experimental/filesystem/iterators/directory_iterator.cc: Test post-increment. * testsuite/experimental/filesystem/iterators/ recursive_directory_iterator.cc: Likewise. Modified: branches/gcc-6-branch/libstdc++-v3/ChangeLog branches/gcc-6-branch/libstdc++-v3/include/experimental/bits/fs_dir.h branches/gcc-6-branch/libstdc++-v3/testsuite/experimental/filesystem/iterators/directory_iterator.cc branches/gcc-6-branch/libstdc++-v3/testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc