Requirements for Slicing Ranges

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Mon Sep 2 03:31:23 UTC 2024


On 02/09/2024 2:47 PM, Jonathan M Davis wrote:
> Can anyone see something that I'm missing here?

Indexing and range intervals are indeed distinct things.

An interval does not have to evaluate to a specific bit of data, but an 
index does.

They can also use non-integral keys.

Typically both ``size_t`` and ``ptrdiff_t`` will have defined 
sequentiality, but they may not in the case of a map. Whereby an index 
works but not an interval.

So the question is, how many assumptions surrounding sequentiality is 
being made, along with the key type?



More information about the Digitalmars-d mailing list