about summary refs log tree commit diff
path: root/absl/types
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2017-11-06T20·54-0800
committermisterg <misterg@google.com>2017-11-06T20·58-0500
commit075cf62092b39b640798f70bf7d16b6c82ca2842 (patch)
tree2a342484ba68d37bc6b296cf426477980373a4c8 /absl/types
parent78e1abca86f4294ab26ef36e534798b893c828bd (diff)
Changes imported from Abseil "staging" branch:
  - c3a608de577e0c278b50916ad4803549929f8f72 Merging https://github.com/abseil/abseil-cpp/pull/8/ inte... by Gennadiy Civil <misterg@google.com>
  - d0b528cdf5843db871784c629cb4e7c5165af716 explicitly cast -1 for Span::npos by Jon Cohen <cohenjon@google.com>
  - 32066311a4379f1144f029aaa3740af59b1e364e Remove GUARDED_VAR and PT_GUARDED_VAR entirely. by Abseil Team <absl-team@google.com>
  - 3d3c69d97d15b5c6457906631054109094c083a6 Remove unneeded inline on constexpr definitions. by Alex Strelnikov <strel@google.com>
  - a9a8fe71f90d0b80de8e77375228a7185032636b Remove unneeded lint suppression. by Alex Strelnikov <strel@google.com>

GitOrigin-RevId: c3a608de577e0c278b50916ad4803549929f8f72
Change-Id: I0897ce0b11e41f83fed8d88f18e079a15d086527
Diffstat (limited to 'absl/types')
-rw-r--r--absl/types/span.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/absl/types/span.h b/absl/types/span.h
index f4738153116e..e2abe78059dd 100644
--- a/absl/types/span.h
+++ b/absl/types/span.h
@@ -279,7 +279,7 @@ class Span {
   using size_type = size_t;
   using difference_type = ptrdiff_t;
 
-  static const size_type npos = -1;
+  static const size_type npos = ~size_type{0};
 
   constexpr Span() noexcept : Span(nullptr, 0) {}
   constexpr Span(pointer array, size_type length) noexcept