This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/14317] Template functions linking problem


------- Additional Comments From giovannibajo at libero dot it  2004-02-27 12:38 -------
This is how the template inclusion model works, and it's what 99% of the 
compilers implement. There is also another separation model (using 
keyword 'export') which allows to keep the template implementation in a 
different file. Only one compiler on earth implements it right now, and there 
are ongoing discussions about its usefulness (the compiler can't "precompile" 
the template in any way, so it needs to "remember" its definition somehow, and 
maybe even reparse the implementation file later while compiling another file 
causing instantiation).

In short, I suggest you live with this for now. This is how everybody does.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14317


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]