Need for (C++20) Contiguous Range

IGotD- nise at nise.com
Fri Oct 9 16:09:08 UTC 2020


On Friday, 9 October 2020 at 15:14:19 UTC, Ola Fosheim Grøstad 
wrote:
>
> I guess it in some cases would be technically possible to 
> emulate fixed stride with a recast to a slice of a struct with 
> padding before and after the element you want.
>
> But not very clean.
>
> Microsoft's experimental gsl::span implementation did support 
> strides, but I don't think that is possible with the std::span 
> that ended up in the standard.  (C++ span is similar to D 
> slices)

This thread makes me happy that I don't need to meddle with 
modern C++. In order to use modern C++ you need to become some 
kind of botanist in order to keep track of all the primitives in 
C++. Just like in the vegetable kingdom, you might discover new 
primitives that you didn't know and new primitives seem to cross 
breed all the time creating new ones.


More information about the Digitalmars-d mailing list