Steven Schveighoffer schrieb:
if you cast an array literal, then it reinterprets each element as if each element were cast to that type.otherwise, it's a reinterpret_cast as you say.
Any reason for defining the behavior like that?The problem is forcing the compiler to reinterpret_cast at compile-time. Using .dup like in the docs doesn't work:
http://codepad.org/P9EZ0dIB without using the ugly auto PALETTE = (cast(RGBA*) cast(ubyte[]) [0xFF,...]) [0 .. 256];
