Need for (C++20) Contiguous Range

Steven Schveighoffer schveiguy at gmail.com
Fri Oct 9 19:01:32 UTC 2020


On 10/8/20 6:28 PM, James Blachly wrote:
> On 10/8/20 10:06 AM, Steven Schveighoffer wrote:
>> On 10/8/20 9:59 AM, Per Nordlöw wrote:
>>> On Thursday, 8 October 2020 at 13:43:01 UTC, Ola Fosheim Grøstad wrote:
>>>> Optimizations that require linear memory access, like SIMD. I believe.
>>>
>>> How could `isContiguousRange` be defined in D?
>>
>> isDynamicArray!T
>>
> 
> Is this trait true of slices pointing to user managed blocks? In 
> particular I may use arena-allocation strategy but would love to have 
> the type also be `isContiguousRange`

The memory a slice points at has nothing to do with its type. If it's a 
T[], it's a dynamic array.

-Steve


More information about the Digitalmars-d mailing list