UFCS for templates

JS js.mdnq at gmail.com
Thu Aug 8 17:34:21 PDT 2013


On Thursday, 8 August 2013 at 17:55:04 UTC, Dicebot wrote:
> On Thursday, 8 August 2013 at 17:35:02 UTC, JS wrote:
>> Can we have UFCS for templates?
>>
>> e.g.,
>>
>> T New(T, A...)(A args) { }
>>
>>
>> T t = T.New(args);
>>
>>
>> Note, in this case, the type parameter is substituted.
>
> As always, providing motivating use case and advantage/cost 
> comparison is usual requirement to make something happen.
>
> DIP's exist for a reason.

Are you not smart enough to come up with use cases yourself? This 
is not some extremely rare thing that might be used 1 in 10^100.


More information about the Digitalmars-d mailing list