id summary reporter owner description type status milestone component version severity resolution keywords cc 11663 No way to query file extension without allocating memory matthew.chaplain@… Beman Dawes "the function .extension() returns an fs::path, containing a fresh string that contains the extension. On certain library implementations that don't implement the SSO -- or, I guess, for files with very long extensions -- there will be a memory allocation each time the function is called. That means that for solutions implementing search-by-extension such as is written in: http://stackoverflow.com/questions/11140483/how-to-get-list-of-files-with-a-specific-extension-in-a-given-folder there could be hundreds of memory allocations for just iterating a directory structure. IMO, there really shouldn't be. I propose adding the function bool path::has_extension(string const&) which can compare the extension in a memory-friendly way." Feature Requests assigned To Be Determined filesystem Boost 1.57.0 Optimization