[libcxx-commits] [PATCH] D133220: fix errors on passing input iterator to `std::views::take`

Hui via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Sep 2 11:26:14 PDT 2022


huixie90 created this revision.
huixie90 added reviewers: philnik, var-const, ldionne.
Herald added a project: All.
huixie90 requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

In the implementation of `std::views::take`, it uses `subrange<Iter>` as part of the return type. But in case of input iterator, `subrange<Iter>` can be ill-formed


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133220

Files:
  libcxx/include/__ranges/take_view.h
  libcxx/test/std/ranges/range.adaptors/range.take/adaptor.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133220.457652.patch
Type: text/x-patch
Size: 9722 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220902/a64c8c56/attachment.bin>


More information about the libcxx-commits mailing list