cast(size_t)&c != 0, but c is null

Timothee Cour thelastmammoth at gmail.com
Thu May 16 02:50:54 PDT 2013


interface with C++ for example (for example extern(C++) classes )

On Thu, May 16, 2013 at 2:31 AM, Maxim Fomin <maxim at maxim-fomin.ru> wrote:

> On Thursday, 16 May 2013 at 09:05:46 UTC, Dicebot wrote:
>
>> On Wednesday, 15 May 2013 at 19:30:41 UTC, Dmitry Olshansky wrote:
>>
>>> Won't this work?
>>> *cast(void**)&object
>>>
>>
>> Right question is "is this guaranteed to work by spec?".
>>
>
> Spec is silent about this but in practice this should work. Real question
> is here why would you want "pointer to class" when you have normal
> reference and what such "pointer" would give you.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20130516/77c2627d/attachment.html>


More information about the Digitalmars-d-learn mailing list