https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106452
Bug ID: 106452 Summary: Iteration of filesystem::path("//") results in path("//") and not path("/") Product: gcc Version: 12.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: services+gccbugs at vasama dot org Target Milestone: --- path("//").begin()->string() returns "//"s and not "/"s as might be expected. path("//.").begin()->string() returns "/"s as expected. https://godbolt.org/z/4YdY6bq3a #include <filesystem> #include <cassert> int main() { assert( std::filesystem::path("//").begin()->string() == std::filesystem::path("//.").begin()->string()); }