Strict aliasing in D
monarch_dodra
monarchdodra at gmail.com
Sat Jul 27 01:59:19 PDT 2013
On Saturday, 27 July 2013 at 08:35:36 UTC, deadalnix wrote:
> On Saturday, 27 July 2013 at 08:08:01 UTC, monarch_dodra wrote:
>> Thank you for the answer. I expected D to do strict aliasing
>> for the reasons you mentioned. This does come up with two
>> follow up question though:
>>
>> 1. Does strict aliasing apply to slices?
>> 2. C++ uses 'char' as a 'neutral' type that can alias to
>> anything. What about D? Does char fill that role? Does ubyte?
>
> We have void* and void[], I think they should have that role.
You can't read or write to void though (can you?), which is one
of the main points in doing an un-strict alias: Raw binary
storage.
More information about the Digitalmars-d
mailing list