diff --git a/include/multi_span.h b/include/multi_span.h index e35fc33..a8a1af2 100644 --- a/include/multi_span.h +++ b/include/multi_span.h @@ -1594,13 +1594,12 @@ public: // Free functions for manipulating spans // - // reshape a multi_span into a different dimensionality // DimCount and Enabled here are workarounds for a bug in MSVC 2015 template 0), typename = std::enable_if_t > -constexpr auto -as_multi_span(SpanType s, Dimensions2... dims) -> multi_span + bool Enabled = (DimCount > 0), typename = std::enable_if_t> +constexpr auto as_multi_span(SpanType s, Dimensions2... dims) + -> multi_span { static_assert(details::is_multi_span::value, "Variadic as_multi_span() is for reshaping existing spans."); @@ -1687,7 +1686,8 @@ constexpr auto as_multi_span(T* const& ptr, dim... args) -> multi_span, Dimensions...> { return {reinterpret_cast*>(ptr), - details::static_as_multi_span_helper>(args..., details::Sep{})}; + details::static_as_multi_span_helper>(args..., + details::Sep{})}; } template diff --git a/include/span.h b/include/span.h index 44e1b8d..98e08fd 100644 --- a/include/span.h +++ b/include/span.h @@ -579,7 +579,11 @@ public: #ifndef GSL_MSVC_NO_DEFAULT_MOVE_CTOR constexpr span& operator=(span&& other) noexcept = default; #else - constexpr span& operator=(span&& other) noexcept { storage_ = std::move(other.storage_); return *this; } + constexpr span& operator=(span&& other) noexcept + { + storage_ = std::move(other.storage_); + return *this; + } #endif // [span.sub], span subviews template diff --git a/include/string_span.h b/include/string_span.h index 3fe826f..e18e07a 100644 --- a/include/string_span.h +++ b/include/string_span.h @@ -22,9 +22,9 @@ #include "gsl_assert.h" #include "gsl_util.h" #include "span.h" +#include #include #include -#include #ifdef _MSC_VER