converting a byte array to a struct array?
grauzone
none at example.net
Sat Jan 2 16:54:00 PST 2010
Trass3r wrote:
> grauzone schrieb:
>> Second, the bug: casting arrays at compiletime seems to behave
>> differently from casting at runtime. Casting at compiletime doesn't
>> reinterpret cast, it does conversion! Demonstration here:
>> http://codepad.org/OGjXADdu
>>
>> Feel free to file some bug reports.
>
> Just found out this is stated as a feature in the docs.
> http://www.digitalmars.com/d/2.0/expression.html#ArrayLiteral
Interesting. then this is an anti-feature too. At least it sounds like a
very bad idea. The compiler/language tries to be "smart" here, but only
introduces inconsistencies.
> http://codepad.org/bvk63OPw
More information about the Digitalmars-d-learn
mailing list