diff --git a/include/gsl/multi_span b/include/gsl/multi_span index 5e0eaac..f9058b5 100644 --- a/include/gsl/multi_span +++ b/include/gsl/multi_span @@ -213,7 +213,7 @@ private: struct static_bounds_dynamic_range_t { - template ::value>> + template ::value>> constexpr operator T() const GSL_NOEXCEPT { return narrow_cast(-1); @@ -230,25 +230,25 @@ constexpr bool operator!=(static_bounds_dynamic_range_t, static_bounds_dynamic_r return false; } -template ::value>> +template ::value>> constexpr bool operator==(static_bounds_dynamic_range_t, T other) GSL_NOEXCEPT { return narrow_cast(-1) == other; } -template ::value>> +template ::value>> constexpr bool operator==(T left, static_bounds_dynamic_range_t right) GSL_NOEXCEPT { return right == left; } -template ::value>> +template ::value>> constexpr bool operator!=(static_bounds_dynamic_range_t, T other) GSL_NOEXCEPT { return narrow_cast(-1) != other; } -template ::value>> +template ::value>> constexpr bool operator!=(T left, static_bounds_dynamic_range_t right) GSL_NOEXCEPT { return right != left; @@ -1539,7 +1539,7 @@ public: } template , std::remove_cv_t>::value>> constexpr bool operator==(const multi_span& other) const GSL_NOEXCEPT @@ -1549,7 +1549,7 @@ public: } template , std::remove_cv_t>::value>> constexpr bool operator!=(const multi_span& other) const GSL_NOEXCEPT @@ -1558,7 +1558,7 @@ public: } template , std::remove_cv_t>::value>> constexpr bool operator<(const multi_span& other) const GSL_NOEXCEPT @@ -1567,7 +1567,7 @@ public: } template , std::remove_cv_t>::value>> constexpr bool operator<=(const multi_span& other) const GSL_NOEXCEPT @@ -1576,7 +1576,7 @@ public: } template , std::remove_cv_t>::value>> constexpr bool operator>(const multi_span& other) const GSL_NOEXCEPT @@ -1585,7 +1585,7 @@ public: } template , std::remove_cv_t>::value>> constexpr bool operator>=(const multi_span& other) const GSL_NOEXCEPT @@ -1805,14 +1805,14 @@ public: template ::value, - typename Dummy = std::enable_if_t> + typename = std::enable_if_t> constexpr strided_span(multi_span av, bounds_type bounds) : strided_span(av.data(), av.bounds().total_size(), std::move(bounds)) { } // convertible - template ::value>> constexpr strided_span(const strided_span& other) : data_(other.data_), bounds_(other.bounds_) @@ -1900,7 +1900,7 @@ public: constexpr const_reverse_iterator crend() const { return const_reverse_iterator{cbegin()}; } template , std::remove_cv_t>::value>> constexpr bool operator==(const strided_span& other) const GSL_NOEXCEPT @@ -1910,7 +1910,7 @@ public: } template , std::remove_cv_t>::value>> constexpr bool operator!=(const strided_span& other) const GSL_NOEXCEPT @@ -1919,7 +1919,7 @@ public: } template , std::remove_cv_t>::value>> constexpr bool operator<(const strided_span& other) const GSL_NOEXCEPT @@ -1928,7 +1928,7 @@ public: } template , std::remove_cv_t>::value>> constexpr bool operator<=(const strided_span& other) const GSL_NOEXCEPT @@ -1937,7 +1937,7 @@ public: } template , std::remove_cv_t>::value>> constexpr bool operator>(const strided_span& other) const GSL_NOEXCEPT @@ -1946,7 +1946,7 @@ public: } template , std::remove_cv_t>::value>> constexpr bool operator>=(const strided_span& other) const GSL_NOEXCEPT @@ -1966,7 +1966,7 @@ private: return ret; } - template > + template > static index_type resize_stride(const index_type& strides, std::ptrdiff_t, void* = nullptr) { // Only strided arrays with regular strides can be resized @@ -1975,7 +1975,7 @@ private: return strides; } - template 1), typename Dummy = std::enable_if_t> + template 1), typename = std::enable_if_t> static index_type resize_stride(const index_type& strides, std::ptrdiff_t d) { // Only strided arrays with regular strides can be resized diff --git a/include/gsl/pointers b/include/gsl/pointers index a02d3a9..83ac9ea 100644 --- a/include/gsl/pointers +++ b/include/gsl/pointers @@ -71,13 +71,13 @@ class not_null public: static_assert(std::is_assignable::value, "T cannot be assigned nullptr."); - template ::value>> + template ::value>> constexpr not_null(U&& u) : ptr_(std::forward(u)) { Expects(ptr_ != nullptr); } - template ::value>> + template ::value>> constexpr not_null(const not_null& other) : not_null(other.get()) { } diff --git a/include/gsl/string_span b/include/gsl/string_span index 476403a..33e096a 100644 --- a/include/gsl/string_span +++ b/include/gsl/string_span @@ -491,7 +491,7 @@ bool operator!=(gsl::basic_string_span one, const T& other) GSL_N template < typename CharT, std::ptrdiff_t Extent = gsl::dynamic_extent, typename T, - typename Dummy = std::enable_if_t< + typename = std::enable_if_t< std::is_convertible, Extent>>::value && !gsl::details::is_basic_string_span::value>> bool operator!=(const T& one, gsl::basic_string_span other) GSL_NOEXCEPT @@ -511,7 +511,7 @@ bool operator<(gsl::basic_string_span one, const T& other) GSL_NO template < typename CharT, std::ptrdiff_t Extent = gsl::dynamic_extent, typename T, - typename Dummy = std::enable_if_t< + typename = std::enable_if_t< std::is_convertible, Extent>>::value && !gsl::details::is_basic_string_span::value>> bool operator<(const T& one, gsl::basic_string_span other) GSL_NOEXCEPT @@ -528,7 +528,7 @@ bool operator<(const T& one, gsl::basic_string_span other) GSL_NO template < typename CharT, std::ptrdiff_t Extent = gsl::dynamic_extent, typename T, typename DataType = typename T::value_type, - typename Dummy = std::enable_if_t< + typename = std::enable_if_t< !gsl::details::is_span::value && !gsl::details::is_basic_string_span::value && std::is_convertible::value && std::is_same().size(), *std::declval().data())>, @@ -542,7 +542,7 @@ bool operator<(gsl::basic_string_span one, const T& other) GSL_NO template < typename CharT, std::ptrdiff_t Extent = gsl::dynamic_extent, typename T, typename DataType = typename T::value_type, - typename Dummy = std::enable_if_t< + typename = std::enable_if_t< !gsl::details::is_span::value && !gsl::details::is_basic_string_span::value && std::is_convertible::value && std::is_same().size(), *std::declval().data())>, @@ -565,7 +565,7 @@ bool operator<=(gsl::basic_string_span one, const T& other) GSL_N template < typename CharT, std::ptrdiff_t Extent = gsl::dynamic_extent, typename T, - typename Dummy = std::enable_if_t< + typename = std::enable_if_t< std::is_convertible, Extent>>::value && !gsl::details::is_basic_string_span::value>> bool operator<=(const T& one, gsl::basic_string_span other) GSL_NOEXCEPT @@ -581,7 +581,7 @@ bool operator<=(const T& one, gsl::basic_string_span other) GSL_N template < typename CharT, std::ptrdiff_t Extent = gsl::dynamic_extent, typename T, typename DataType = typename T::value_type, - typename Dummy = std::enable_if_t< + typename = std::enable_if_t< !gsl::details::is_span::value && !gsl::details::is_basic_string_span::value && std::is_convertible::value && std::is_same().size(), *std::declval().data())>, @@ -594,7 +594,7 @@ bool operator<=(gsl::basic_string_span one, const T& other) GSL_N template < typename CharT, std::ptrdiff_t Extent = gsl::dynamic_extent, typename T, typename DataType = typename T::value_type, - typename Dummy = std::enable_if_t< + typename = std::enable_if_t< !gsl::details::is_span::value && !gsl::details::is_basic_string_span::value && std::is_convertible::value && std::is_same().size(), *std::declval().data())>, @@ -616,7 +616,7 @@ bool operator>(gsl::basic_string_span one, const T& other) GSL_NO template < typename CharT, std::ptrdiff_t Extent = gsl::dynamic_extent, typename T, - typename Dummy = std::enable_if_t< + typename = std::enable_if_t< std::is_convertible, Extent>>::value && !gsl::details::is_basic_string_span::value>> bool operator>(const T& one, gsl::basic_string_span other) GSL_NOEXCEPT @@ -632,7 +632,7 @@ bool operator>(const T& one, gsl::basic_string_span other) GSL_NO template < typename CharT, std::ptrdiff_t Extent = gsl::dynamic_extent, typename T, typename DataType = typename T::value_type, - typename Dummy = std::enable_if_t< + typename = std::enable_if_t< !gsl::details::is_span::value && !gsl::details::is_basic_string_span::value && std::is_convertible::value && std::is_same().size(), *std::declval().data())>, @@ -645,7 +645,7 @@ bool operator>(gsl::basic_string_span one, const T& other) GSL_NO template < typename CharT, std::ptrdiff_t Extent = gsl::dynamic_extent, typename T, typename DataType = typename T::value_type, - typename Dummy = std::enable_if_t< + typename = std::enable_if_t< !gsl::details::is_span::value && !gsl::details::is_basic_string_span::value && std::is_convertible::value && std::is_same().size(), *std::declval().data())>, @@ -667,7 +667,7 @@ bool operator>=(gsl::basic_string_span one, const T& other) GSL_N template < typename CharT, std::ptrdiff_t Extent = gsl::dynamic_extent, typename T, - typename Dummy = std::enable_if_t< + typename = std::enable_if_t< std::is_convertible, Extent>>::value && !gsl::details::is_basic_string_span::value>> bool operator>=(const T& one, gsl::basic_string_span other) GSL_NOEXCEPT @@ -683,7 +683,7 @@ bool operator>=(const T& one, gsl::basic_string_span other) GSL_N template < typename CharT, std::ptrdiff_t Extent = gsl::dynamic_extent, typename T, typename DataType = typename T::value_type, - typename Dummy = std::enable_if_t< + typename = std::enable_if_t< !gsl::details::is_span::value && !gsl::details::is_basic_string_span::value && std::is_convertible::value && std::is_same().size(), *std::declval().data())>, @@ -696,7 +696,7 @@ bool operator>=(gsl::basic_string_span one, const T& other) GSL_N template < typename CharT, std::ptrdiff_t Extent = gsl::dynamic_extent, typename T, typename DataType = typename T::value_type, - typename Dummy = std::enable_if_t< + typename = std::enable_if_t< !gsl::details::is_span::value && !gsl::details::is_basic_string_span::value && std::is_convertible::value && std::is_same().size(), *std::declval().data())>,