YAB (Yet Another HP/gcc Bug)
Lev Assinovsky
LAssinovsky@algorithm.aelita.com
Thu Aug 14 11:09:00 GMT 2003
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
More information about the Gcc-help
mailing list