size_t is always greater than 0, so remove the artifact from the old
index_type.
Patch by Michael Schellenberger Costa.
Differential Revision: https://reviews.llvm.org/D71996
_LIBCPP_INLINE_VISIBILITY constexpr reference operator[](size_type __idx) const noexcept
{
- _LIBCPP_ASSERT(__idx >= 0 && __idx < size(), "span<T,N>[] index out of bounds");
+ _LIBCPP_ASSERT(__idx < size(), "span<T,N>[] index out of bounds");
return __data[__idx];
}
_LIBCPP_INLINE_VISIBILITY constexpr reference operator[](size_type __idx) const noexcept
{
- _LIBCPP_ASSERT(__idx >= 0 && __idx < size(), "span<T>[] index out of bounds");
+ _LIBCPP_ASSERT(__idx < size(), "span<T>[] index out of bounds");
return __data[__idx];
}