Make pdfium::span<> range constructors consistent
Equivalent to https://crrev.com/c/6498780
Change-Id: I3c1830ed4de9d6ed86f7090c078dab3db430450e
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/131212
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fxcrt/span.h b/core/fxcrt/span.h
index b8d7b70..b4d58e0 100644
--- a/core/fxcrt/span.h
+++ b/core/fxcrt/span.h
@@ -607,7 +607,7 @@
internal::FixedExtentConstructibleFromExtent<extent, N> &&
std::ranges::borrowed_range<R>)
// NOLINTNEXTLINE(google-explicit-constructor)
- constexpr explicit span(R&& range)
+ constexpr explicit(N != extent) span(R&& range)
// SAFETY: `std::ranges::size()` returns the number of elements
// `std::ranges::data()` will point to, so accessing those elements will
// be safe.