casting as char at CT fail

Shammah Chancellor anonymous at coward.com
Tue Nov 26 17:22:07 PST 2013


On 2013-11-26 23:31:14 +0000, bioinfornatics said:

> Hi,
> this time i have so many question about CT …
> iws and ibuclaw help me for this.
> 
> I stuck currently about a cast at CT -> http://www.dpaste.dzfl.pl/1a28a22c
> 
> it seem this should works but not…
> So if you confirm maybe a report is needed
> 
> thanks to everyone


String at compile time seem to be represented as dchar.   Also, the 
loop on bitsPerChar won't work at compile time right now.     I think 	 
maskTmp = cast(T)((1 << bitsPerChar) - 1);
 does the same thing though.

http://www.dpaste.dzfl.pl/985a2f42

Fails with some weird internal DMD error now though while trying to 
instantiate the enum.   Maybe time for a bug report?



More information about the Digitalmars-d-learn mailing list