On 08/15/2013 10:39 PM, Meta wrote:

> On Friday, 16 August 2013 at 04:14:04 UTC, Ali Çehreli wrote:

>> 1) Function parameter list
>>
>> 2) Template parameter list
>>
>> 3) Array literal element list
>>
>> Are there more?

> I'm not sure if it should be considered a separate case, but there is this:
>
> foreach(type; TypeTuple!(ubyte, uint, ulong))
> {
>      writeln(type.max);
> }

Thanks! That's a very interesting one. Other than the peculiarity of the loop being a compile-time foreach, that TypeTuple is appearing at a place where its expansion is not even valid:

    foreach (type; ubyte, uint, ulong) {    // compilation error

Ali

Reply via email to