[libcxx-commits] [PATCH] D141238: [libc++][test] Move `common_input_iterator` to `test_iterators.h`

Joe Loser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jan 9 07:48:49 PST 2023


jloser added a subscriber: CaseyCarter.
jloser added inline comments.


================
Comment at: libcxx/test/support/test_iterators.h:720
+
+  constexpr std::iter_reference_t<Base> operator*() const { return *it_; }
+
----------------
philnik wrote:
> @huixie90 This is different in the two versions we have. Is `std::iter_reference_t<Base>` correct here, or should we just use `decltype(auto)`?
Thanks for calling this out explicitly.  I noticed this and stuck with `std::iter_reference_t<Base>` rather than `decltype(auto)` that @CaseyCarter fixed in https://reviews.llvm.org/D141216.  I think using `iter_reference_t` is fine, but I'll let others chime in here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141238



More information about the libcxx-commits mailing list