Code fails with linker error. Why?

Chris Nicholson-Sauls via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Oct 4 02:39:11 PDT 2014


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);


More information about the Digitalmars-d-learn mailing list