forked from OSchip/llvm-project
[libcxx][test] Remove redundant semiregular checks for CPOs
Some individual test files verify the CPO under test satisfies `semiregular` concept. This is redundant since it is already part of the test in verifying whether the entity is indeed a CPO in `libcxx/test/std/library/description/conventions/customization.point.object/cpo.compile.pass.cpp`. Differential Revision: https://reviews.llvm.org/D116173
This commit is contained in:
parent
f7b096d754
commit
7f410251e8
|
@ -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); }
|
||||
|
|
|
@ -36,8 +36,6 @@ static_assert(std::ranges::size(std::move(array_of_incomplete)) == 42);
|
|||
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; }
|
||||
};
|
||||
|
|
|
@ -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::is_invocable_v<RangeSSizeT, int (&)[1]>);
|
||||
|
||||
static_assert(std::semiregular<std::remove_cv_t<RangeSSizeT>>);
|
||||
|
||||
struct SizeMember {
|
||||
constexpr size_t size() { return 42; }
|
||||
};
|
||||
|
|
|
@ -48,9 +48,6 @@ constexpr bool test() {
|
|||
{
|
||||
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&>);
|
||||
|
|
|
@ -43,11 +43,6 @@ constexpr void testType(U u) {
|
|||
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 {};
|
||||
|
|
Loading…
Reference in New Issue