[libcxx-commits] [PATCH] D103273: [libc++] Update all the pre-defined iterator types for C++20
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu May 27 12:04:38 PDT 2021
Mordante requested changes to this revision.
Mordante added a comment.
This revision now requires changes to proceed.
Thanks a lot for working on this! After this has landed I can remove some work-arounds from my `<format>` branch.
================
Comment at: libcxx/include/iterator:219
+ typedef void difference_type; // until C++20
+ typedef std::ptrdiff_t difference_type; // since C++20
typedef void reference;
----------------
`std::ptrdiff_t` -> `ptrdiff_t` here and other places.
================
Comment at: libcxx/include/iterator:245
typedef void pointer;
explicit front_insert_iterator(Container& x); // constexpr in C++20
----------------
I miss `constexpr front_insert_iterator() noexcept = default; // since C++20` and the implementation.
`back_insert_iterator` has the same issue.
================
Comment at: libcxx/include/iterator:269
typedef void pointer;
insert_iterator(Container& x, typename Container::iterator i); // constexpr in C++20
----------------
I miss `insert_iterator() = default; // since C++20` and the implementation. (This one has no `constexpr` nor `noexcept`.)
================
Comment at: libcxx/include/iterator:355
public:
- typedef charT char_type;
- typedef traits traits_type;
- typedef basic_istream<charT,traits> istream_type;
+ typedef std::input_iterator_tag iterator_category;
+ typedef T value_type;
----------------
Remove `std::` here and similar places.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103273/new/
https://reviews.llvm.org/D103273
More information about the libcxx-commits
mailing list