[libc++][test] zip_view test cleanups
authorCasey Carter <Casey@Carter.net>
Sun, 8 Jan 2023 07:12:21 +0000 (23:12 -0800)
committerCasey Carter <Casey@Carter.net>
Sun, 8 Jan 2023 23:34:30 +0000 (15:34 -0800)
commitad41d1e26b12855fbb2b3104580a8d2b63bd5827
tree14b4eb2668dd28bbc91e5d1dc816094d47c6269e
parent8f7e674771081b0d9d1099aff016536140b2e79b
[libc++][test] zip_view test cleanups

* The reference type of `common_input_iterator<const int*>` can't be `int&`, because an lvalue of type `const int` _can't_ bind to an `int&`. Fix by changing the return type of `operator*` to `decltype(auto)` to make it fully generic.
* `range.zip/iterator/compare.pass.cpp` verifies that the iterators of a `zip_view` don't support `<=>` when the underlying iterators do not; this is not true after LWG-3692.
* libc++ doesn't yet implement P2165R4 "Compatibility between tuple, pair and tuple-like objects", so the tests expect `zip_view` to use `pair` in places where the working draft requires `tuple`.

Differential Revision: https://reviews.llvm.org/D141216
libcxx/test/std/ranges/range.adaptors/range.zip/cpo.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.zip/ctor.default.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.zip/iterator/compare.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.zip/iterator/deref.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.zip/iterator/member_types.compile.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.zip/iterator/subscript.pass.cpp
libcxx/test/std/ranges/range.adaptors/range.zip/types.h