summaryrefslogtreecommitdiff
path: root/absl
diff options
context:
space:
mode:
Diffstat (limited to 'absl')
-rw-r--r--absl/types/span.h3
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()