This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
YAB (Yet Another HP/gcc Bug)
- From: "Lev Assinovsky" <LAssinovsky at algorithm dot aelita dot com>
- To: "Gcc-Help (E-mail)" <gcc-help at gcc dot gnu dot org>
- Date: Thu, 14 Aug 2003 15:09:00 +0400
- Subject: YAB (Yet Another HP/gcc Bug)
file t.cpp, gcc 3.2.3, HP-UX-11.00:
template <class T>
class A
{
public:
T * x;
static T* m_o;
};
template <class T> T * A<T>::m_o = 0;
class B: public A<int>
{
public:
B() { A<int>::m_o = 0; }
};
int main()
{
B b;
}
THE RESULT:
-bash-2.05b$ g++ -o t t.cpp
/usr/ccs/bin/ld: Unsatisfied symbols:
A<int>::m_o (first referenced in /var/tmp//cc2W1tpt.o) (data)
collect2: ld returned 1 exit status
Is there work around, besides explicit template specialization?
Thanks.
----
Lev Assinovsky
Aelita Software Corporation
O&S Core Division, Programmer
ICQ# 165072909