mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Fix compile error on GCC.
This commit is contained in:
parent
adae9bc473
commit
453321704f
@ -1688,12 +1688,6 @@ constexpr auto as_span(T* const& ptr, dim<Dimensions>... args)
|
||||
details::static_as_span_helper<static_bounds<Dimensions...>>(args..., details::Sep{})};
|
||||
}
|
||||
|
||||
template<typename Span>
|
||||
constexpr Span as_span(contiguous_span_iterator<Span> start, contiguous_span_iterator<Span> last)
|
||||
{
|
||||
return { &*start, static_cast<typename Span::size_type>(last - start)};
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
constexpr auto as_span(T* arr, std::ptrdiff_t len) ->
|
||||
typename details::SpanArrayTraits<T, dynamic_range>::type
|
||||
@ -2098,6 +2092,13 @@ contiguous_span_iterator<Span> operator+(typename contiguous_span_iterator<Span>
|
||||
return rhs + n;
|
||||
}
|
||||
|
||||
|
||||
template<typename Span>
|
||||
constexpr Span as_span(contiguous_span_iterator<Span> start, contiguous_span_iterator<Span> last)
|
||||
{
|
||||
return { &*start, static_cast<typename Span::size_type>(last - start) };
|
||||
}
|
||||
|
||||
template <typename Span>
|
||||
class general_span_iterator
|
||||
: public std::iterator<std::random_access_iterator_tag, typename Span::value_type>
|
||||
|
Loading…
Reference in New Issue
Block a user