https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71005
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |5.4 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- It looks like directory_iterator will have the same problem, as both just copy the object, which shares ownership of the underlying representation instead of making a new state. Oops.