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

Stefan Koch uplink.coder at googlemail.com
Thu Jun 4 17:23:43 UTC 2020


On Thursday, 4 June 2020 at 17:16:48 UTC, Steven Schveighoffer 
wrote:
> 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

Ideally we would not pile a hack on top of a hack.


More information about the Digitalmars-d mailing list