<div dir="ltr">this works:<div><br></div><div>void foo(T, size_t n)(T[n] a ...) {...}<br></div><div><br></div><div>However, see this: <a href="https://github.com/libmir/mir/issues/337">https://github.com/libmir/mir/issues/337</a></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 29, 2016 at 1:57 PM, Ilya Yaroshenko via Digitalmars-d <span dir="ltr"><<a href="mailto:digitalmars-d@puremagic.com" target="_blank">digitalmars-d@puremagic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Thursday, 29 September 2016 at 20:54:12 UTC, Ilya Yaroshenko wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
On Thursday, 29 September 2016 at 20:47:35 UTC, Andrei Alexandrescu wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Ilya Yaroshenko <<a href="mailto:ilyayaroshenko@gmail.com" target="_blank">ilyayaroshenko@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
On Thursday, 29 September 2016 at 18:55:07 UTC, Andrei Alexandrescu wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[...]<br>
</blockquote><span class="">
<br>
This is the same like in current ndslice code.<br>
For 3D cube[i, j, k] 64(!) templates can be generated because<br>
each of i, j, k can be int, uint, size_t, sizediff_t.<br>
<br>
</span></blockquote><span class="">
<br>
Yah, I remember. Can you experiment with arranging things such that all templates forward to the same backend function that does the work?<br>
</span></blockquote><span class="">
<br>
This already done. But anyway lot of template bloat would note disappeared. In addition there are inlining and mapSlice<br>
</span></blockquote>
<br>
I am sorry for my terrible English (i am in a dark room now)<br>
</blockquote></div><br></div>