This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]