[all-commits] [llvm/llvm-project] ad41d1: [libc++][test] zip_view test cleanups

Casey Carter via All-commits all-commits at lists.llvm.org
Sun Jan 8 15:34:48 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ad41d1e26b12855fbb2b3104580a8d2b63bd5827
      https://github.com/llvm/llvm-project/commit/ad41d1e26b12855fbb2b3104580a8d2b63bd5827
  Author: Casey Carter <Casey at Carter.net>
  Date:   2023-01-08 (Sun, 08 Jan 2023)

  Changed paths:
    M libcxx/test/std/ranges/range.adaptors/range.zip/cpo.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.zip/ctor.default.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.zip/iterator/compare.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.zip/iterator/deref.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.zip/iterator/member_types.compile.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.zip/iterator/subscript.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.zip/types.h

  Log Message:
  -----------
  [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




More information about the All-commits mailing list