about summary refs log tree commit diff
path: root/absl/types/span.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/types/span.h')
-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