[libcxx-commits] [PATCH] D111231: [libc++] [test] Change a lot of free begin/end pairs to members. NFCI.

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 6 11:55:59 PDT 2021


Quuxplusone marked an inline comment as done.
Quuxplusone added inline comments.


================
Comment at: libcxx/test/std/ranges/range.adaptors/range.common.view/types.h:35-37
+static_assert( std::ranges::view<ContiguousView>);
+static_assert( std::ranges::contiguous_range<ContiguousView>);
+static_assert(!std::copyable<ContiguousView>);
----------------
@ldionne @Mordante: I propose a separate commit to globally replace the name `ContiguousView` with `MoveOnlyView`, since that seems to be its actual raison d'etre. (This affects several of these "types.h" files.)


================
Comment at: libcxx/test/std/ranges/range.adaptors/range.join.view/types.h:136
   constexpr InputValueIter<T> begin() { return ptr_; }
-  constexpr const InputValueIter<T> begin() const { return ptr_; }
   constexpr T *end() { return ptr_.ptr_ + 4; }
----------------
This was certainly a typo in the original commit (I will keep linking to https://quuxplusone.github.io/blog/2019/01/03/const-is-a-contract/ until people start reading it! :)) but since the unit tests currently don't seem to care, I don't care to dig deeper either.
It's not as simple as making this `InputValueIter<const T>`, since `InputValueIter` defines its `value_type` without any `remove_cv_t`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111231



More information about the libcxx-commits mailing list