www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: template forward reference

Sean Kelly Wrote:

 It looks like a compiler bug to me, though who knows when it will be 
 addressed.

Problems related to this are getting tougher and tougher to get around. I now compile with all files on one command-line, and that is no longer enough. I have templates in several different files now. If I change the order of .d files on the command-line, I get different messages like this: template instance Foo!(Far) does not match any template declaration I have not been able to reduce the errors to a simple testcase, but I understand the basic problem: D does not have a global view of templates. It needs to remember every template definition that it sees, including specializations, so that it can insert it when requested. This has become a very serious problem and may make it impossible for us to use this language, which I otherwise enjoy very much.
Aug 01 2007