Global const variables

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Oct 21 09:56:53 PDT 2014


On Tue, 21 Oct 2014 16:47:04 +0000
Solomon E via Digitalmars-d-learn <digitalmars-d-learn at puremagic.com>
wrote:

> That's unsafe because the implementation might change, and 
> pointer arithmetic is unsafe in general.
sure, ponter casting is implementation-dependend. but .ptr is
guaranteed to work as expected. 'a' is just a `struct { size_t length;
void* ptr }` now, but this representation is implementation detail, not
a convention.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20141021/a12b0b11/attachment.sig>


More information about the Digitalmars-d-learn mailing list