digitalmars.D - Argument not match
- Li Jie (21/21) Mar 15 2006 CODE:
- Regan Heath (4/6) Mar 15 2006 Yes, just point your news client at digitalmars.com on the usual port 11...
- Tom (19/35) Mar 16 2006 # import std.stdio;
- Tom S (10/11) Mar 16 2006 Apparently, he was trying to use implicit template instantiation which
- Tom (3/7) Mar 16 2006 Silly me.
- Ben Phillips (7/28) Mar 16 2006 While this is sure to get fixed in future versions of D, the current ITI
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
Mar 15 2006
On Thu, 16 Mar 2006 04:01:07 +0000 (UTC), Li Jie <cpunion gmail.com> wrote:and... Can I subscibe this news group? my network speed is very slowly for this site.Yes, just point your news client at digitalmars.com on the usual port 119, and you can get a list of groups containing digitalmars.D etc. Regan
Mar 15 2006
In article <dvanu3$1krf$1 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)This compiles fine. Not sure what you're trying to do. Tom;
Mar 16 2006
Tom wrote:This compiles fine. Not sure what you're trying to do.Apparently, he was trying to use implicit template instantiation which doesn't want to work in the example he posted. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d-pu s+: a-->----- C+++$>++++ UL P+ L+ E--- W++ N++ o? K? w++ !O !M V? PS- PE- Y PGP t 5 X? R tv-- b DI- D+ G e>+++ h>++ !r !y ------END GEEK CODE BLOCK------ Tomasz Stachowiak /+ a.k.a. h3r3tic +/
Mar 16 2006
In article <dvbrhb$rp$1 digitaldaemon.com>, Tom S says...Tom wrote:Silly me. Tom;This compiles fine. Not sure what you're trying to do.Apparently, he was trying to use implicit template instantiation which doesn't want to work in the example he posted.
Mar 16 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 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
Mar 16 2006