[Bug c++/25748] Template instantiated twice

2006-01-11 Thread pinskia at gcc dot gnu dot org
--- Comment #3 from pinskia at gcc dot gnu dot org 2006-01-11 14:16 --- Yes this is invalid code, in 4.1.0 and above we get: t.cc:2: error: definition of 'foo::t' is not in namespace enclosing 'foo' This is a dup of bug 13140. *** This bug has been marked as a duplicate of 13140 ***

[Bug c++/25748] Template instantiated twice

2006-01-11 Thread pinskia 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 T foo::t = 0; } That is invalid code as you are instantiating in a different namespace. I think there is a bug about acce

[Bug c++/25748] Template instantiated twice

2006-01-11 Thread rguenth at gcc dot gnu dot org
--- Comment #1 from rguenth at gcc dot gnu dot org 2006-01-11 11:05 --- The conditions look slightly bogus to me. The correct thing would be to put the definition of the static data member in the same file of the class declaration. Other than that, Cygwin may have problems with whateve