diff options
Diffstat (limited to 'absl/types')
-rw-r--r-- | absl/types/span.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/absl/types/span.h b/absl/types/span.h index ea1808d3bae8..d7f48d9f3f64 100644 --- a/absl/types/span.h +++ b/absl/types/span.h @@ -515,7 +515,7 @@ class Span { // absl::MakeSpan(vec).last(5); // throws std::out_of_range constexpr Span last(size_type len) const { return (len <= size()) - ? Span(data() + size() - len, len) + ? Span(size() - len + data(), len) : (base_internal::ThrowStdOutOfRange("len > size()"), Span()); } |