Code fails with linker error. Why?

eles via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Oct 4 03:24:30 PDT 2014


On Saturday, 4 October 2014 at 09:39:12 UTC, Chris 
Nicholson-Sauls wrote:
> In the original you are casting an int to a pointer type, which 
> is legitimate (although rarely a good idea).  The other side of 
> the matter is simply precedence.
>
> cast(T)a.b;
>
> Is really the same as:
>
> cast(T)(a.b);

Yes, you are right. Then it's cast back when assigning.


More information about the Digitalmars-d-learn mailing list