This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14317] Template functions linking problem
- From: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Feb 2004 12:38:20 -0000
- Subject: [Bug c++/14317] Template functions linking problem
- References: <20040227020901.14317.linux4sin@mail.ru>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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