And here would be

    version(assert)
    {
        import core.exception;

        if(from > to || to > length)
            throw new RangeError;
    }