This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/44855] Static members not initialised in explicit template instances of library
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 29 Mar 2011 19:51:21 +0000
- Subject: [Bug c++/44855] Static members not initialised in explicit template instances of library
- Auto-submitted: auto-generated
- References: <bug-44855-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44855
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-03-29 19:51:15 UTC ---
I should have read the code properly ... if you've suppressed implicit
instantiation in main.cpp and you want the explicit instantiation in a shared
object to be used I would expect that you need to *either* use -fpic so the
instantiation in the .so is used *or* declare the explicit instantiation by
uncommenting the "extern template" declaration.
So I think the behaviour you're seeing is normal