diff --git a/libcxx/include/span b/libcxx/include/span --- a/libcxx/include/span +++ b/libcxx/include/span @@ -307,13 +307,13 @@ _LIBCPP_INLINE_VISIBILITY constexpr reference front() const noexcept { - static_assert(_Extent > 0, "span[].front() on empty span"); + _LIBCPP_ASSERT(!empty(), "span::front() on empty span"); return __data[0]; } _LIBCPP_INLINE_VISIBILITY constexpr reference back() const noexcept { - static_assert(_Extent > 0, "span[].back() on empty span"); + _LIBCPP_ASSERT(!empty(), "span::back() on empty span"); return __data[size()-1]; }