convert interger to pointer

Moritz Warning moritzwarning at web.de
Sat Jun 28 19:05:05 PDT 2008


On Sun, 29 Jun 2008 01:56:22 +0000, Moritz Warning wrote:

> Ok, nvm. :)
> 
> void* p = cast(void*) 1;
> A a = cast(A) p;

ok, a problem remains.
How to do this at compile time?:

static const T first = cast(T) cast(void*) 0;
static const T second = cast(T) cast(void*) 1;

..doesn't work.



More information about the Digitalmars-d mailing list