This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/41005] [C++0x] Unable to link fstream open and ctor with std::string argument.
- From: "jwakely dot gcc at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Aug 2009 19:39:23 -0000
- Subject: [Bug libstdc++/41005] [C++0x] Unable to link fstream open and ctor with std::string argument.
- References: <bug-41005-8829@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from jwakely dot gcc at gmail dot com 2009-08-10 19:39 -------
The definitions are in that header, but the 'extern template' extension is used
to prevent the compiler from instantiating the code in your program, see
http://gcc.gnu.org/onlinedocs/gcc/Template-Instantiation.html
Instead of instantiating that code in every object a single explicit
instantiation is provided in libstdc++.so, that's the purpose of
src/fstream-inst.cc
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41005