[libcxx-commits] [PATCH] D116489: [libc++] [API BREAK] Change `fs::path::iterator::iterator_category` to `input_iterator_tag`.
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jan 17 13:41:04 PST 2022
Quuxplusone added inline comments.
================
Comment at: libcxx/docs/ReleaseNotes.rst:109
+ as either ``for (auto&& c : path)`` or ``for (const auto& c : path)``.
+ ``std::reverse_iterator<path::iterator>`` is no longer rejected.
+
----------------
ldionne wrote:
>
Before this patch, it was rejected in C++17 and C++20 (and C++14, if you used `std::__fs::filesystem::path::iterator` to get at it).
After this patch, it is rejected in neither C++17 nor C++20.
(Ah, you thought it would be rejected in C++17 because `path::iterator` is an input iterator, not a bidirectional iterator, in C++17? Well, C++17 `reverse_iterator` doesn't care what your iterator category is. :) In C++17, it has an `operator--` that DTRT, so it works.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116489/new/
https://reviews.llvm.org/D116489
More information about the libcxx-commits
mailing list