summaryrefslogtreecommitdiff
path: root/absl/types
diff options
context:
space:
mode:
Diffstat (limited to 'absl/types')
-rw-r--r--absl/types/internal/span.h3
-rw-r--r--absl/types/span.h2
2 files changed, 1 insertions, 4 deletions
diff --git a/absl/types/internal/span.h b/absl/types/internal/span.h
index 1920a89e..d653bb2c 100644
--- a/absl/types/internal/span.h
+++ b/absl/types/internal/span.h
@@ -32,9 +32,6 @@ template <typename T>
class Span;
namespace span_internal {
-// A constexpr min function
-constexpr size_t Min(size_t a, size_t b) noexcept { return a < b ? a : b; }
-
// Wrappers for access to container data pointers.
template <typename C>
constexpr auto GetDataImpl(C& c, char) noexcept // NOLINT(runtime/references)
diff --git a/absl/types/span.h b/absl/types/span.h
index cd863a95..d7bdbb1f 100644
--- a/absl/types/span.h
+++ b/absl/types/span.h
@@ -420,7 +420,7 @@ class Span {
// absl::MakeSpan(vec).subspan(5); // throws std::out_of_range
constexpr Span subspan(size_type pos = 0, size_type len = npos) const {
return (pos <= size())
- ? Span(data() + pos, span_internal::Min(size() - pos, len))
+ ? Span(data() + pos, (std::min)(size() - pos, len))
: (base_internal::ThrowStdOutOfRange("pos > size()"), Span());
}