diff --git a/src/span.h b/src/span.h index 3c5028f0b7..93718f6189 100644 --- a/src/span.h +++ b/src/span.h @@ -248,9 +248,8 @@ template T& SpanPopBack(Span& span) { size_t size = span.size(); - ASSERT_IF_DEBUG(size > 0); - T& back = span[size - 1]; - span = Span(span.data(), size - 1); + T& back = span.back(); + span = span.first(size - 1); return back; }