default args for templates

Dicebot public at dicebot.lv
Fri Jan 17 05:44:25 PST 2014


On Friday, 17 January 2014 at 13:40:05 UTC, Jacob Carlborg wrote:
> On 2014-01-17 13:53, bearophile wrote:
>
>> If the instantiation is automatic, then what's the literal to 
>> specify
>> the un-instantiated template?
>
> Perhaps based on the context, but that might be a bad idea.

I think it is impossible in general case:

pragma(msg, StructSymbol.stringof); // "StructSymbol" or 
"StructSymbol!(void)" ?

Add aliases on top of it and it quickly gets messy.


More information about the Digitalmars-d mailing list