Playing with ranges and ufcs
Jonathan M Davis
jmdavisProg at gmx.com
Wed Feb 27 15:57:50 PST 2013
On Thursday, February 28, 2013 00:46:56 bearophile wrote:
> > To do the same with user-defined structures time ago I have
> > suggested this, that is currently closed waiting for a better
>
> > solution:
> What I meant to say is that if the assert(i <= j) is inside the
> pre-condition then there's a hope to run it at compile time
> introducing some new trick inside the D language. But if you put
> code inside a version(assert) inside the body of opSlice() then
> the possibility of inventing a trick to do it is much lower.
Honestly, I think that that's a complete pipe dream anyway, but the point is
to make it act like arrays, and they use RangeError.
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list