This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/25748] Template instantiated twice
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Jan 2006 12:42:11 -0000
- Subject: [Bug c++/25748] Template instantiated twice
- References: <bug-25748-6594@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-01-11 12:42 -------
3) And also defined in the anonymous namespace in another module:
namespace { template<typename T> T foo<T>::t = 0; }
That is invalid code as you are instantiating in a different namespace. I
think there is a bug about accepting this code (I have not looked yet).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25748