DIP Mir1 Draft: Variadic template parameters with the same time.

Timothee Cour via Digitalmars-d digitalmars-d at puremagic.com
Thu Sep 29 14:06:13 PDT 2016


this works:

void foo(T, size_t n)(T[n] a ...) {...}

However, see this: https://github.com/libmir/mir/issues/337


On Thu, Sep 29, 2016 at 1:57 PM, Ilya Yaroshenko via Digitalmars-d <
digitalmars-d at puremagic.com> wrote:

> On Thursday, 29 September 2016 at 20:54:12 UTC, Ilya Yaroshenko wrote:
>
>> On Thursday, 29 September 2016 at 20:47:35 UTC, Andrei Alexandrescu wrote:
>>
>>> Ilya Yaroshenko <ilyayaroshenko at gmail.com> wrote:
>>>
>>>> On Thursday, 29 September 2016 at 18:55:07 UTC, Andrei Alexandrescu
>>>> wrote:
>>>>
>>>>> [...]
>>>>>
>>>>
>>>> This is the same like in current ndslice code.
>>>> For 3D cube[i, j, k] 64(!) templates can be generated because
>>>> each of i, j, k can be int, uint, size_t, sizediff_t.
>>>>
>>>>
>>> Yah, I remember. Can you experiment with arranging things such that all
>>> templates forward to the same backend function that does the work?
>>>
>>
>> This already done. But anyway lot of template bloat would note
>> disappeared. In addition there are inlining and mapSlice
>>
>
> I am sorry for my terrible English (i am in a dark room now)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20160929/4e2750fa/attachment.html>


More information about the Digitalmars-d mailing list