What the heck is wrong with CTFE's?
JS
js.mdnq at gmail.com
Mon Jul 8 05:08:43 PDT 2013
On Monday, 8 July 2013 at 12:03:52 UTC, JS wrote:
> 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.
sheit... sorry, stupid mistake..
the issue with the foreach is still under question though, when I
try to use a for loop with i and access TT[i] I get an error
about i not being compile time readable. (maybe this is because
of how the type tuple is defined? possibly need a index method to
get the value?)
More information about the Digitalmars-d
mailing list