Don Wrote: > assert: should remain. It is important to the compiler. I can easily > imagine it participating in range checking. > uint x = whatever(); > assert(x<100); > ubyte b = x; // This implicit conversion is OK; we know x is in the > appropriate range.
how about this? long more=fileLength; ubyte[256] buff; for(; more>=buff.length ; more-=buff.length) { //read from file, no breaks } //last read read(file,buff.ptr,more); auto rd=buff[0..more]; //can't cast long to uint