Re: how to resolve "matches more than one template declaration"?

2014-06-20 Thread Jonathan M Davis via Digitalmars-d-learn
On Fri, 20 Jun 2014 20:40:49 + Juanjo Alvarez via Digitalmars-d-learn wrote: > Hi, > > Newbie question: > > void foo(S)(S oneparam){} > void foo(S)(S oneparam, int anotherParam){} > alias fooStr = foo!string; > > Gives: > > "Error: template test.foo matches more than one template > declaratio

how to resolve "matches more than one template declaration"?

2014-06-20 Thread Juanjo Alvarez via Digitalmars-d-learn
Hi, Newbie question: void foo(S)(S oneparam){} void foo(S)(S oneparam, int anotherParam){} alias fooStr = foo!string; Gives: "Error: template test.foo matches more than one template declaration:" How could I fix it so the alias aliases one of the two versions? Also, why can't "fooStr" be a