template specialization

Sean Kelly sean at f4.ca
Mon Mar 5 08:20:51 PST 2007


Jarrett Billingsley wrote:
> "Thorsten" <thorstenkiefer at gmx.de> wrote in message 
> news:esd2dn$126l$1 at digitalmars.com...
>> , I get this :
>> tools.d(162): template tools.toString(T : T[]) specialization not allowed 
>> for deduced parameter T
>>
>> According to the online manual this should be no error.
>> How can I solve this ?
> 
> You are instantiating this template implicitly, as:
> 
> char[] s = toString([1, 2, 3]);
> 
> The spec says "Function template type parameters that are to be implicitly 
> deduced may not have specializations." 

Really?  I'm almost sure I've done this before too.  How weird.


Sean



More information about the Digitalmars-d mailing list