[libcxx-commits] [PATCH] D122072: [libc++][test] Adds an cpp20_output_iterator.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Mar 27 08:12:29 PDT 2022
Mordante marked 2 inline comments as done.
Mordante added inline comments.
================
Comment at: libcxx/test/support/test_iterators.h:540-544
+ TEST_CONSTEXPR_CXX14 cpp20_output_iterator operator++(int) {
+ auto temp = *this;
+ ++*this;
+ return temp;
+ }
----------------
philnik wrote:
> The post-increment `operator++` return `void` with the ranges stuff.
Unfortunately that won't work since the concept requires ` *__it++ = _VSTD::forward<_Tp>(__t);`, deferring a `void` won't work.
================
Comment at: libcxx/test/support/test_iterators.h:541
+ TEST_CONSTEXPR_CXX14 cpp20_output_iterator operator++(int) {
+ auto temp = *this;
+ ++*this;
----------------
CaseyCarter wrote:
> This won't compile - `*this` is move-only,
Good point, thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122072/new/
https://reviews.llvm.org/D122072
More information about the libcxx-commits
mailing list