YAB (Yet Another HP/gcc Bug)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux