DIP Mir1 Draft: Variadic template parameters with the same time.
Ilya Yaroshenko via Digitalmars-d
digitalmars-d at puremagic.com
Thu Sep 29 11:59:34 PDT 2016
On Thursday, 29 September 2016 at 18:55:07 UTC, Andrei
Alexandrescu wrote:
> On 09/29/2016 02:53 PM, Ilya Yaroshenko wrote:
>> `(Index...)` -> `(size_t[] Index...)` // this is about template
>> arguments, not runtime
>
> What is the drawback of taking Index... and constraining it
> with a template constraint (all must be integral)? We use that
> in a few places in Phobos. -- Andrei
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.
More information about the Digitalmars-d
mailing list