Ranges longer than size_t.max
Jonathan M Davis
jmdavisProg at gmx.com
Sat Dec 29 13:29:18 PST 2012
On Saturday, December 29, 2012 22:18:53 monarch_dodra wrote:
> At the very least, there was a discussion some time ago that for
> a (finite) RA range, range[range.length] must compile. Ditto for
> slicing.
>
> This was never enforced though... Which is a shame (IMO)...
> ...Well, I was the one to suggest that actually, but I never did
> it, so blame falls on me :/
>
> I'll put it back on my todo list.
It's now enforced that finite random access ranges have length, so we're part
of the way there.
The big thing that we really need though is for issue# 7177 to be implemented.
http://d.puremagic.com/issues/show_bug.cgi?id=7177
If that gets implemented, then we can require that random access ranges and
ranges with slicing fully support $.
We'd probably still need to check range[range.length] though, just to check
that length and indexing are properly compatible.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list