Re: Specialized template in different module

2016-03-14 Thread Mike Parker via Digitalmars-d-learn
On Monday, 14 March 2016 at 08:42:58 UTC, John wrote: If I define a template in one module, and specialize it in a second module, the compiler doesn't like it when I try to call a function using the template. If I put everything in the same module it works. So are template specializations lim

Re: Specialized template in different module

2016-03-14 Thread ag0aep6g via Digitalmars-d-learn
On 14.03.2016 09:42, John wrote: module one; struct Test(T) {} void testing(T)(Test!T t) {} module two; struct Test(T : int) {} void main() { Test!int i; testing!int(i); } Output: error : testing (Test!int t) is not callable using argument types (Test!int)

Specialized template in different module

2016-03-14 Thread John via Digitalmars-d-learn
If I define a template in one module, and specialize it in a second module, the compiler doesn't like it when I try to call a function using the template. module one; struct Test(T) {} void testing(T)(Test!T t) {} module two; struct Test(T : int) {} void main() { Test!int i