From 2ed3e75e119da83eb2e0c9662ebb3383f0f90f17 Mon Sep 17 00:00:00 2001 From: Derek Mauro Date: Fri, 14 Apr 2023 11:49:24 -0700 Subject: Span: Remove MSVC 2015 workaround PiperOrigin-RevId: 524347923 Change-Id: I4538eb8d5d6e8befbeb8ab992b0ad44dd8f4f00c --- absl/types/span.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'absl/types/span.h') 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() -- cgit v1.2.3