How templates work (bonus) - Full instantiation of Iota!(1,5)

Steven Schveighoffer schveiguy at gmail.com
Thu Jun 4 17:16:48 UTC 2020


On 6/4/20 1:09 PM, Stefan Koch wrote:
> On Thursday, 4 June 2020 at 17:03:38 UTC, Steven Schveighoffer wrote:
>> On 6/4/20 9:21 AM, Stanislav Blinov wrote:
>>> [...]
>>
>> That's a cool trick. I like the fact that it uses mixins to output the 
>> numbers as well.
>>
>> [...]
> 
> Preallocate. or it'll be slow.

Sure, I could do that.

But my point is not to submit a proposal for static iota, but to show 
that CTFE can handle the whole thing, we don't need to use static 
foreach (which as I understand it can be very slow).

-Steve


More information about the Digitalmars-d mailing list