What the heck is wrong with CTFE's?
JS
js.mdnq at gmail.com
Mon Jul 8 05:03:51 PDT 2013
On Monday, 8 July 2013 at 11:56:40 UTC, JS wrote:
>
> The following code inserts properties for each type,
>
> auto name = "Value"~((i == 0) ? "" : to!string(i++));
>
> always as the i == 0 evaluate to true.
>
> 1. obviously ints work because the code below works with i as a
> counter but we can't do a simple compare on it... this seems
> like a bug.
this is a mistake, I'm not sure what's going on, i seems to
increment but name always seems to evaluate to the largest i.
More information about the Digitalmars-d
mailing list