int => struct cast

bearophile bearophileHUGS at lycos.com
Thu Oct 2 09:31:15 PDT 2008


Jarrett Billingsley:
> I'm guessing you can't do it because it doesn't make any sense.  Since
> when did you expect this to work?  The typical solution is to cast
> through a pointer, i.e. "*cast(S*)&n".

The typical D solution here is probably:
a[ S(n) ]++;

Bye and thank you,
bearophile


More information about the Digitalmars-d-learn mailing list