diff --git a/GSL.natvis b/GSL.natvis index a467a17de..1bf27a5c5 100644 --- a/GSL.natvis +++ b/GSL.natvis @@ -19,9 +19,7 @@ - - - + {{ extent = {storage_.size_} }} @@ -31,19 +29,7 @@ - - - {{ extent = {extent} }} - - - extent - storage_.data_ - - - - - - + {span_.storage_.data_,[span_.storage_.size_]na} span_.storage_.size_ @@ -54,20 +40,7 @@ - - - {span_.storage_.data_,[span_.extent]na} - - span_.extent - - span_.extent - span_.storage_.data_ - - - - - - + {span_.storage_.data_,[span_.storage_.size_]na} span_.storage_.size_ @@ -77,19 +50,7 @@ - - - - {span_.storage_.data_,[span_.extent]na} - - span_.extent - - span_.extent - span_.storage_.data_ - - - - + diff --git a/include/gsl/span b/include/gsl/span index 23c58c920..82fe58bac 100644 --- a/include/gsl/span +++ b/include/gsl/span @@ -355,6 +355,13 @@ namespace details constexpr extent_type(size_type size) { Expects(size == Ext); } constexpr size_type size() const noexcept { return Ext; } + + private: +#if defined(GSL_USE_STATIC_CONSTEXPR_WORKAROUND) + static constexpr const size_type size_ = Ext; // static size equal to Ext +#else + static constexpr size_type size_ = Ext; // static size equal to Ext +#endif }; template <>