On 12/05/2017 11:07 AM, A Guy With a Question wrote:
> The following doesn't appear to be valid syntax. Array!Item!T

You can ommit the template argument list parenteses only for single symbols.

Starting with the full syntax:

  Array!(Item!(T))

Since Item!(T) uses a single symbol, T, you can remove the parenteses from that one:

  Array!(Item!T)

The following compiles:

import std.container.array;

struct Item(T) {
}

void main() {
    alias T = int;
    auto a = Array!(Item!T)();
}

Ali

Reply via email to