[Bug libstdc++/90634] filesystem::path insane memory allocations

1000hz.radiowave at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu May 30 09:28:00 GMT 2019


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

--- Comment #15 from baltic <1000hz.radiowave at gmail dot com> ---
(In reply to Jonathan Wakely from comment #14)

> It's true that the standard does not require path::iterator to be usable in
> generic algorithms that expect forward iterators or bidirectional iterators.

Indeed! Ability to run a modifying algorithm on a path's elements is extremely
useful. Sorting path's components makes a lot of practical sense. So does
std::random_shuffle them. And ability to heapify them (std::make_heap) is
basically unavoidable in any app, which has to deal with filesystem::path. 
But what weirdo would want to store hundreds of thousands of paths without x10
memory overhead, right?

So i agree. Just screw the C++ standard and do what you think is best for ppl
out there.

Thanks for your great work!


More information about the Gcc-bugs mailing list