safer casts - take II

Janice Caron caron800 at googlemail.com
Tue May 13 16:12:39 PDT 2008


Note that in addition, the ! form would also be the one to use for:

    void[] p;
    T[] q = cast!(T[])p;

So it's not /just/ removal of const that "danger cast" is for. It's
also for casting from void to non-void. For that reason, calling it
"break const" would be highly counterintuitive.



More information about the Digitalmars-d mailing list