[libcxx-commits] [PATCH] D117950: [libc++][NFC] Use cpp17_output_iterator in tests.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 2 23:01:21 PST 2022


Mordante marked 7 inline comments as done.
Mordante added a comment.

In D117950#3291713 <https://reviews.llvm.org/D117950#3291713>, @ldionne wrote:

> Good -- and then I assume we'll want to revisit all the places where we have tests running on `cpp17_output_iterator` and also run them on the new `output_iterator` (the C++20 one you'll have just introduced)? Furthermore, I assume we have the same problem for all other iterator "archetypes". We could in theory have the Cpp17FooIterator version and the C++20 version for each of those. I'm not asking that you sign up to do those, though, I understand you're probably interested in `output_iterator` because of `std::format`.

It's indeed motivated by `std::format`. I'm using some algorithms, for example `std::fill_n`, which don't work with move-only iterators. So I either need to implement a move-only version myself or improve the existing algorithms. I think the improvement can be useful for users of the algorithms. (I'm actually surprised the algorithm requirements haven't changed in C++20.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117950/new/

https://reviews.llvm.org/D117950



More information about the libcxx-commits mailing list