[libcxx-commits] [PATCH] D116173: [libcxx][test] Remove redundant semiregular checks for CPOs

Joe Loser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Dec 28 19:10:19 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG7f410251e8d4: [libcxx][test] Remove redundant semiregular checks for CPOs (authored by joe_loser).

Changed prior to commit:
  https://reviews.llvm.org/D116173?vs=395890&id=396452#toc

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116173

Files:
  libcxx/test/std/iterators/iterator.requirements/iterator.cust/iterator.cust.swap.pass.cpp
  libcxx/test/std/ranges/range.access/size.pass.cpp
  libcxx/test/std/ranges/range.access/ssize.pass.cpp
  libcxx/test/std/ranges/range.adaptors/range.counted/counted.pass.cpp
  libcxx/test/std/ranges/range.factories/range.iota.view/views_iota.pass.cpp


Index: libcxx/test/std/ranges/range.factories/range.iota.view/views_iota.pass.cpp
===================================================================
--- libcxx/test/std/ranges/range.factories/range.iota.view/views_iota.pass.cpp
+++ libcxx/test/std/ranges/range.factories/range.iota.view/views_iota.pass.cpp
@@ -43,11 +43,6 @@
     ASSERT_SAME_TYPE(decltype(std::views::iota(T(10))), std::ranges::iota_view<T>);
     ASSERT_SAME_TYPE(decltype(std::views::iota(T(10), u)), std::ranges::iota_view<T, U>);
   }
-  // Test that this is semiregular.
-  // Note: we cannot test perfect forwarding because both T and U must be copyable.
-  {
-    static_assert(std::semiregular<std::remove_const_t<decltype(std::views::iota)>>);
-  }
 }
 
 struct X {};
Index: libcxx/test/std/ranges/range.adaptors/range.counted/counted.pass.cpp
===================================================================
--- libcxx/test/std/ranges/range.adaptors/range.counted/counted.pass.cpp
+++ libcxx/test/std/ranges/range.adaptors/range.counted/counted.pass.cpp
@@ -48,9 +48,6 @@
   {
     static_assert(std::addressof(std::views::counted) == std::addressof(std::ranges::views::counted));
 
-    auto copy = std::views::counted;
-    static_assert(std::semiregular<decltype(copy)>);
-
     static_assert( CountedInvocable<int*, size_t>);
     static_assert(!CountedInvocable<int*, LvalueConvertible>);
     static_assert( CountedInvocable<int*, LvalueConvertible&>);
Index: libcxx/test/std/ranges/range.access/ssize.pass.cpp
===================================================================
--- libcxx/test/std/ranges/range.access/ssize.pass.cpp
+++ libcxx/test/std/ranges/range.access/ssize.pass.cpp
@@ -25,8 +25,6 @@
 static_assert( std::is_invocable_v<RangeSSizeT, int (&&)[1]>);
 static_assert( std::is_invocable_v<RangeSSizeT, int (&)[1]>);
 
-static_assert(std::semiregular<std::remove_cv_t<RangeSSizeT>>);
-
 struct SizeMember {
   constexpr size_t size() { return 42; }
 };
Index: libcxx/test/std/ranges/range.access/size.pass.cpp
===================================================================
--- libcxx/test/std/ranges/range.access/size.pass.cpp
+++ libcxx/test/std/ranges/range.access/size.pass.cpp
@@ -36,8 +36,6 @@
 static_assert(std::ranges::size(std::as_const(array_of_incomplete)) == 42);
 static_assert(std::ranges::size(static_cast<const Incomplete(&&)[42]>(array_of_incomplete)) == 42);
 
-static_assert(std::semiregular<std::remove_cv_t<RangeSizeT>>);
-
 struct SizeMember {
   constexpr size_t size() { return 42; }
 };
Index: libcxx/test/std/iterators/iterator.requirements/iterator.cust/iterator.cust.swap.pass.cpp
===================================================================
--- libcxx/test/std/iterators/iterator.requirements/iterator.cust/iterator.cust.swap.pass.cpp
+++ libcxx/test/std/iterators/iterator.requirements/iterator.cust/iterator.cust.swap.pass.cpp
@@ -22,8 +22,6 @@
 
 using IterSwapT = decltype(std::ranges::iter_swap);
 
-static_assert(std::semiregular<std::remove_cv_t<IterSwapT>>);
-
 struct HasIterSwap {
   int &value_;
   explicit HasIterSwap(int &value) : value_(value) { assert(value == 0); }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116173.396452.patch
Type: text/x-patch
Size: 3129 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211229/ee8783fc/attachment.bin>


More information about the libcxx-commits mailing list