From d3468230b1ecf0124fba1adcc76d3cf48ce326b8 Mon Sep 17 00:00:00 2001 From: Jordan Maples Date: Wed, 20 May 2020 12:29:56 -0700 Subject: [PATCH] renaming extent to prevent shadowing of static member --- include/gsl/span | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/gsl/span b/include/gsl/span index cbc060e..f933493 100644 --- a/include/gsl/span +++ b/include/gsl/span @@ -420,24 +420,24 @@ public: constexpr span() noexcept : storage_(nullptr, details::extent_type<0>()) {} - template = 0> + template = 0> constexpr explicit span(pointer ptr, size_type count) noexcept : storage_(ptr, count) { Expects(count == Extent); } - template = 0> + template = 0> constexpr span(pointer ptr, size_type count) noexcept : storage_(ptr, count) {} - template = 0> + template = 0> constexpr explicit span(pointer firstElem, pointer lastElem) noexcept : storage_(firstElem, static_cast(lastElem - firstElem)) { Expects(lastElem - firstElem == static_cast(Extent)); } - template = 0> + template = 0> constexpr span(pointer firstElem, pointer lastElem) noexcept : storage_(firstElem, static_cast(lastElem - firstElem)) {} @@ -492,9 +492,9 @@ public: constexpr span(const span& other) noexcept = default; template < - class OtherElementType, std::size_t OtherExtent, std::size_t MyExtent = Extent, + class OtherElementType, std::size_t OtherExtent, std::size_t SpanExtent = Extent, std::enable_if_t< - !(MyExtent != dynamic_extent && OtherExtent == dynamic_extent) && + !(SpanExtent != dynamic_extent && OtherExtent == dynamic_extent) && (Extent == dynamic_extent || OtherExtent == dynamic_extent || Extent == OtherExtent) && details::is_allowed_element_type_conversion::value, int> = 0> constexpr span(const span& other) noexcept @@ -502,9 +502,9 @@ public: {} template < - class OtherElementType, std::size_t OtherExtent, std::size_t MyExtent = Extent, + class OtherElementType, std::size_t OtherExtent, std::size_t SpanExtent = Extent, std::enable_if_t< - (MyExtent != dynamic_extent && OtherExtent == dynamic_extent) && + (SpanExtent != dynamic_extent && OtherExtent == dynamic_extent) && (Extent == dynamic_extent || OtherExtent == dynamic_extent || Extent == OtherExtent) && details::is_allowed_element_type_conversion::value, int> = 0> constexpr explicit span(const span& other) noexcept