Re: Weird link error

2015-04-20 Thread Baz via Digitalmars-d-learn
On Monday, 20 April 2015 at 17:02:18 UTC, CodeSun wrote: And where I can find the D symbol definition, because information like ‘_D2tt2Ti12__T3getTAyaZ3getMFAyaZAya’ makes me really confused. --- import std.demangle; auto friendlySymbol = demangle("_D2tt2Ti12__T3getTAyaZ3getMFAyaZAya"); --

Re: Weird link error

2015-04-20 Thread anonymous via Digitalmars-d-learn
On Monday, 20 April 2015 at 17:02:18 UTC, CodeSun wrote: I have test a snippet of code, and I encountered with a weird link error. The following is the demo: import std.stdio; interface Ti { T get(T)(int num); T get(T)(string str); } class Test : Ti { T get(T)(int num

Re: Weird link error

2015-04-20 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 20 April 2015 at 17:02:18 UTC, CodeSun wrote: So does it mean I can't declare function template inside interface? You can, but they are considered final so a body is required to use them - they aren't just a pointer to the derived implementation.

Weird link error

2015-04-20 Thread CodeSun via Digitalmars-d-learn
I have test a snippet of code, and I encountered with a weird link error. The following is the demo: import std.stdio; interface Ti { T get(T)(int num); T get(T)(string str); } class Test : Ti { T get(T)(int num) { writeln("ok"); }