On Thursday, 29 September 2016 at 18:53:26 UTC, Andrei Alexandrescu wrote:
On 09/29/2016 02:37 PM, Ilya Yaroshenko wrote:
On Thursday, 29 September 2016 at 17:56:59 UTC, Stefan Koch wrote:
Solution

T[] can be added to a template variadic name.

```
void foo(size_t[] Index...)(Indexes index)
{
    ...
}
```

This description does not tell me anything.

Current template argument can be declared as `(Index...)`.
The solutions just allows to specify the type `(size_t[] Index...)`

This feature exists. What am I missing? -- Andrei

No, it does not
---
, void foo(size_t[] I...)(I i)
{
        
}

void main()
{
        foo(1, 2, 3);
}
---
/d812/f719.d(1): Error: found '...' when expecting ')'
/d812/f719.d(1): Error: found ')' when expecting '('
/d812/f719.d(1): Error: basic type expected, not (
/d812/f719.d(1): Error: function declaration without return type. (Note that constructors are always named 'this')
/d812/f719.d(2): Error: found '{' when expecting ')'
/d812/f719.d(4): Error: semicolon expected following function declaration
/d812/f719.d(4): Error: unrecognized declaration

Reply via email to