diff --git a/libcxx/test/std/ranges/range.utility/view.interface/view.interface.pass.cpp b/libcxx/test/std/ranges/range.utility/view.interface/view.interface.pass.cpp --- a/libcxx/test/std/ranges/range.utility/view.interface/view.interface.pass.cpp +++ b/libcxx/test/std/ranges/range.utility/view.interface/view.interface.pass.cpp @@ -233,17 +233,19 @@ static_assert(!SizeInvocable); static_assert( SizeInvocable); - using SignedSize = std::common_type_t>; + static_assert(std::same_as() - std::declval()), std::ptrdiff_t>); + using UnsignedSize = std::make_unsigned_t; + using SignedSize = std::common_type_t>; ForwardRange forwardRange; assert(forwardRange.size() == 8); assert(static_cast(forwardRange).size() == 8); assert(std::ranges::size(forwardRange) == 8); - static_assert(std::same_as())), std::size_t>); + static_assert(std::same_as())), UnsignedSize>); static_assert(std::same_as())), SignedSize>); assert(std::ranges::size(static_cast(forwardRange)) == 8); - static_assert(std::same_as())), std::size_t>); + static_assert(std::same_as())), UnsignedSize>); static_assert(std::same_as())), SignedSize>); SizeIsTen sizeTen;