diff --git a/libcxx/include/span b/libcxx/include/span --- a/libcxx/include/span +++ b/libcxx/include/span @@ -300,7 +300,7 @@ _LIBCPP_INLINE_VISIBILITY constexpr reference operator[](size_type __idx) const noexcept { - _LIBCPP_ASSERT(__idx >= 0 && __idx < size(), "span[] index out of bounds"); + _LIBCPP_ASSERT(__idx < size(), "span[] index out of bounds"); return __data[__idx]; } @@ -469,7 +469,7 @@ _LIBCPP_INLINE_VISIBILITY constexpr reference operator[](size_type __idx) const noexcept { - _LIBCPP_ASSERT(__idx >= 0 && __idx < size(), "span[] index out of bounds"); + _LIBCPP_ASSERT(__idx < size(), "span[] index out of bounds"); return __data[__idx]; }