Are you kidding me??? `cast(T[])`? Why even *bother* with const correctness if it's just to do *that* ? Not to mention it needlessly makes your function inferred system.

It's the interface that's wrong, the fix should be there. Does using "const" here even buy you any speed? I don't see any justification for this cast.