isRandomAccessRange!(const(size_t[])) is false ... ?
Jonathan M Davis
jmdavisProg at gmx.com
Thu Sep 12 15:15:27 PDT 2013
On Thursday, September 12, 2013 23:53:15 Joseph Rushton Wakeling wrote:
> import std.range;
>
> void main()
> {
> assert(isRandomAccessRange!(const(size_t[])));
> }
>
> .... results in an assertion error. This is a bug, no ... ?
Nope. It's correct. Because it's const, you can't call popFront on it or any
of the other mutating range operations. So, it's not a valid range.
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list