diff --git a/GSL.natvis b/GSL.natvis index a467a17..1bf27a5 100644 --- a/GSL.natvis +++ b/GSL.natvis @@ -19,9 +19,7 @@ - - - + {{ extent = {storage_.size_} }} @@ -31,43 +29,7 @@ - - - {{ extent = {extent} }} - - - extent - storage_.data_ - - - - - - - {span_.storage_.data_,[span_.storage_.size_]na} - - span_.storage_.size_ - - span_.storage_.size_ - span_.storage_.data_ - - - - - - {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 +39,18 @@ - - + - {span_.storage_.data_,[span_.extent]na} + {span_.storage_.data_,[span_.storage_.size_]na} - span_.extent + span_.storage_.size_ - span_.extent + span_.storage_.size_ span_.storage_.data_ - + diff --git a/include/gsl/span b/include/gsl/span index 23c58c9..82fe58b 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 <>