DIP 1023--Resolution of Template Alias Formal Parameters in Template Functions--Community Review Round 1

rikki cattermole rikki at cattermole.co.nz
Fri Sep 6 13:10:49 UTC 2019


On 07/09/2019 12:58 AM, Stefanos Baziotis wrote:
> Thanks Mike and jmh530.
> 
> On Friday, 6 September 2019 at 12:48:34 UTC, rikki cattermole wrote:
>>
>> This one should be since it is stating current behavior.
>>
>> Looks like I got it wrong, its third not second:
>>
>> ```
>> struct TemplateType(T) { }
>> alias TemplateAlias(T) = TemplateType!T
>> void templateFunction(TemplateAlias!T arg) { }
>> ```
>>
>> Two errors (missed the first, semicolon missing).
>> So:
>>
>> ```
>> struct TemplateType(T) { }
>> alias TemplateAlias(T) = TemplateType!T;
>> void templateFunction(T)(TemplateAlias!T arg) { }
>> ```
>>
> 
> Indeed. Thanks, it will be corrected. Do I wait for the next
> round to do corrections?

Unless Mike says otherwise, yes.

>>
>> I replied with this so that you had feedback for improving the DIP if 
>> other people find it hard to understand.
> 
> You mean include this in the DIP? In the "Description" section there's an
> identical example.

No.
It is for future reference if there is a trend of people finding it hard 
to follow.


More information about the Digitalmars-d mailing list