summaryrefslogtreecommitdiff
path: root/absl/types/span.h
diff options
context:
space:
mode:
authorGravatar Derek Mauro <dmauro@google.com>2023-04-14 11:49:24 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2023-04-14 11:50:18 -0700
commit2ed3e75e119da83eb2e0c9662ebb3383f0f90f17 (patch)
treef36d7229e6f9d6dcbd691c25316420ce43075cde /absl/types/span.h
parentbce5bec5517f8c9ec448db9c2ffdf977dfff18eb (diff)
Span: Remove MSVC 2015 workaround
PiperOrigin-RevId: 524347923 Change-Id: I4538eb8d5d6e8befbeb8ab992b0ad44dd8f4f00c
Diffstat (limited to 'absl/types/span.h')
-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()