On Sunday, 19 November 2017 at 14:46:32 UTC, Rumbu wrote:
Sorry to disappoint, but Span<T> is something else. The .net equivalent of D slices is in fact the not so popular ArraySegment<T> available in .net since 2008.

Span<T> will allow access to unmanaged and stack memory in the same way as using a standard array.

Seems to be a C# version of C++ gsl::span:

https://github.com/Microsoft/GSL/blob/master/include/gsl/span

But yes, as I understand it, it will only allow shrinking the view, so it is a proper pointer-like type with sub-typing like behaviour. It might appear in C++20 as array_view eventually… not sure.

Reply via email to