<div dir="ltr">I have several times written (and seen written) code like<div><br></div><div>    auto directory = std::filesystem::path(...);</div><div>    for (auto const &amp; path : directory) {</div><div>        use(path);</div><div>    }</div><div><br></div><div>when what I meant was</div><div><br></div><div><div>    auto directory = std::filesystem::path(...);</div><div>    for (auto path_it = std::filesystem::directory_iterator(directory); path_it != std::filesystem::directory_iterator(); ++path_it) {</div><div>        use(*path_it);</div><div>    }</div><div><br></div><div>but I have never intentionally iterated over the components of the path (and if I did, I would expect to need to apply some transformation to get that).</div><div><br></div></div><div>I have to agree with Arthur that this is a big source of errors in the existing API and should not be used as a precedent if at all possible.</div></div>