[all-commits] [llvm/llvm-project] c3cd5f: [libc++][test] Fix invalid test for views::view_in...

Joseph Loser via All-commits all-commits at lists.llvm.org
Wed Oct 27 14:14:32 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c3cd5f5b4f8e78a04a49f5c1e40341110d21a593
      https://github.com/llvm/llvm-project/commit/c3cd5f5b4f8e78a04a49f5c1e40341110d21a593
  Author: Joe Loser <joeloser93 at gmail.com>
  Date:   2021-10-27 (Wed, 27 Oct 2021)

  Changed paths:
    M libcxx/test/std/ranges/range.utility/view.interface/view.interface.pass.cpp

  Log Message:
  -----------
  [libc++][test] Fix invalid test for views::view_interface

The type `MoveOnlyForwardRange` violates the precondition stated in
`view.interface.general`. Specifically, the type passed to
`view_interface` shall model the `view` concept. In turn, this requires the
type to satisfy `movable` concept (and others), but this type
`MoveOnlyForwardRange` does not satisfy the `movable` concept.

Add a move assignment operator so that `MoveOnlyForwardRange` satisfies the
`movable` concept. While we're here, ensure the neighboring types that inherit
from `view_interface` also satisfy the `view` concept to avoid similar issues.

Fixes https://bugs.llvm.org/show_bug.cgi?id=50720

Reviewed By: Quuxplusone, Mordante, #libc

Differential Revision: https://reviews.llvm.org/D112631




More information about the All-commits mailing list