Playing with ranges and ufcs

bearophile bearophileHUGS at lycos.com
Wed Feb 27 15:46:56 PST 2013


> 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.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list