On alias a = b

Nick Sabalausky a at a.a
Sat Mar 19 14:16:46 PDT 2011


"KennyTM~" <kennytm at gmail.com> wrote in message 
news:im0g86$1mr4$1 at digitalmars.com...
> On Mar 19, 11 04:28, so wrote:
>> alias a(T) = b(T, known_type);
>>
>> Would it be an overkill?
>
> If B is a template I think it's more consistent to add a '!':
>
>    alias A(T) = B!(T, int);
>
> But I don't think it worth such generalization given the existing syntax 
> already works:
>
>    template A(T) {
>      alias B!(T, int) A;
>      // alias A = B!(T, known_type);
>    }

Templated functions already use the same sugar.




More information about the Digitalmars-d mailing list