--- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-25
04:11 ---
To mark as a dup of bug 17445.
*** This bug has been marked as a duplicate of 17445 ***
--
What|Removed |Added
--
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-25
04:10 ---
Reopening to ...
--
What|Removed |Added
Status|RESOLVED|UNCO
--- Additional Comments From jaco at kroon dot co dot za 2005-02-27 19:25
---
Ok. The only reason I found this was cause I tried to compile quasar on my
system. The code I supplied was the most reduced form I could create that
duplicated the problem. As such I will attempt to make the
--- Additional Comments From giovannibajo at libero dot it 2005-02-27
09:03 ---
Ah no, then it is ok. When you write:
template<>
FakeList IntFactory::_types;
you are actually *declaring* a specialization of _types. A declaration is not
a definition, so the linker complains. To mutate
--- Additional Comments From jaco at kroon dot co dot za 2005-02-27 06:17
---
$ g++ -o templates templates.C -Wall
/tmp/ccoANWiL.o(.gnu.linkonce.t._ZN7FactoryIiE9createOneEv+0xd): In function
`Factory::createOne()':
: undefined reference to `Factory::_types'
collect2: ld returned 1 exit
--
What|Removed |Added
CC||jaco at kroon dot co dot za
Target Milestone|3.4.0 |---
http://gcc.gnu.org/bugzilla/s
--- Additional Comments From giovannibajo at libero dot it 2005-02-27
00:02 ---
This is still incorrect code. You need an explicit template<> before that
line. Though, after that, I cannot see why it should fail to link. What is the
link error? That is a possible bug in GCC.
--
--- Additional Comments From jaco at kroon dot co dot za 2005-02-26 10:03
---
A more complex example, this code works with gcc 3.3 so this imho is either
incorrect code or a bug in the new parses:
template class FakeList {
public:
void foo() {};
};
template class Factory {
pu