[libcxx-commits] [PATCH] D106704: [libc++] Implement the output_iterator and output_range concepts

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jul 26 08:04:48 PDT 2021


ldionne marked 7 inline comments as done.
ldionne added inline comments.


================
Comment at: libcxx/include/__iterator/concepts.h:133
+  requires (_Ip __it, _Tp&& __t) {
+    *__it++ = _VSTD::forward<_Tp>(__t); // not required to be equality-preserving
+  };
----------------
Quuxplusone wrote:
> As usual, I think it would be nice to use `static_cast<_Tp&&>(__t)` here, but I don't object if we're not doing that (yet).
We're not. If we do that, we can do it across the library and document it somewhere. I don't want to start doing it as one-offs, since that's just creating inconsistency.


================
Comment at: libcxx/include/__ranges/concepts.h:96
   template <class _Tp>
   concept input_range = range<_Tp> && input_iterator<iterator_t<_Tp> >;
 
----------------
Quuxplusone wrote:
> Might drive-by condense these `>>`s.
Will do in a separate NFC commit.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106704



More information about the libcxx-commits mailing list