Argument not match

Ben Phillips Ben_member at pathlink.com
Thu Mar 16 13:33:46 PST 2006


While this is sure to get fixed in future versions of D, the current ITI
implementation is not perfect. You either have to full write out the template

Test!(int)("hello", 5)

or rearrange the argument of Test to 
void Test(T value, char[] name)

*The last example should work, but I haven't tried it.

In article <dvanu3$1krf$1 at digitaldaemon.com>, Li Jie says...
>
>CODE:
>-------------------------
>template Test(T)
>{
>void Test(char[] name, T value)
>{
>writefln("Test");
>}
>}
>
>// in main
>Test("hello", 5);
>-------------------------
>
>Compile it, I get some errors:
>main.d(73): template main.Test(T) does not match any template declaration
>main.d(73): template main.Test(T) cannot deduce template function from argument
>types (char[5],int)
>
>Does not support this?
>
>
>and... Can I subscibe this news group? my network speed is very slowly for this
>site.
>
>
>
>Thanks,
>
>- Li Jie
>
>





More information about the Digitalmars-d mailing list