Details
- Reviewers
Mordante zoecarver - Group Reviewers
Restricted Project - Commits
- rG41bdf64d3e94: [libc++] Update all the pre-defined iterator types for C++20
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks a lot for working on this! After this has landed I can remove some work-arounds from my <format> branch.
libcxx/include/iterator | ||
---|---|---|
253 | std::ptrdiff_t -> ptrdiff_t here and other places. | |
280–281 | I miss constexpr front_insert_iterator() noexcept = default; // since C++20 and the implementation. | |
305–306 | I miss insert_iterator() = default; // since C++20 and the implementation. (This one has no constexpr nor noexcept.) | |
392–400 | Remove std:: here and similar places. |
libcxx/include/iterator | ||
---|---|---|
280–281 | Good catch, somehow I missed those. Thanks. | |
502 | @tcanens I think this one is missing from cppreference: https://en.cppreference.com/w/cpp/iterator/ostreambuf_iterator/ostreambuf_iterator |
libcxx/include/iterator | ||
---|---|---|
502 | It'll be DRed out of existence by p2325r3, so I bet it's not worth fixing on cppreference. | |
899 | I strongly recommend removing the redundant constexpr and noexcept, for cleanliness' sake. (Defaulted functions are always constexpr-auto and noexcept-auto.) | |
libcxx/test/std/iterators/iterator.primitives/iterator.traits/cxx20_iterator_traits.compile.pass.cpp | ||
58 | Nice! :) |
LGTM! I'll leave the final approval for @Quuxplusone.
libcxx/include/iterator | ||
---|---|---|
502 | Yeah when P2325 is applied the default constructors will be removed, but an output_iterator should no longer require default_constructible. For <format> I only need the back_insert_iterator to be an output_iterator. | |
899 | I've no strong opinion about this, but I slight prefer to use the wording the standard provides. Thus including constexpr and noexept. |
std::ptrdiff_t -> ptrdiff_t here and other places.