diff options
author | Benjamin Barenblat <bbaren@google.com> | 2023-09-07 13:16:09 -0400 |
---|---|---|
committer | Benjamin Barenblat <bbaren@google.com> | 2023-09-07 13:16:09 -0400 |
commit | 6fdbff8bbce2a1debdc060df381f39e3dcfb65af (patch) | |
tree | 71f1ef38477a65d5cce472fc042c90087c2bb351 /absl/types/span.h | |
parent | 8d4a80fe37176b1170d7dce0772dea9584ec3e32 (diff) | |
parent | 29bf8085f3bf17b84d30e34b3d7ff8248fda404e (diff) |
Merge new upstream LTS 20230802.0
Diffstat (limited to 'absl/types/span.h')
-rw-r--r-- | absl/types/span.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/absl/types/span.h b/absl/types/span.h index d7bdbb1f..70ed8eb6 100644 --- a/absl/types/span.h +++ b/absl/types/span.h @@ -296,8 +296,7 @@ class Span { // // Returns a reference to the i'th element of this span. constexpr reference operator[](size_type i) const noexcept { - // MSVC 2015 accepts this as constexpr, but not ptr_[i] - return ABSL_HARDENING_ASSERT(i < size()), *(data() + i); + return ABSL_HARDENING_ASSERT(i < size()), ptr_[i]; } // Span::at() |