Код переноса из gcc 2.95.3 в gcc 4.4.2 приводит к новой ошибке времени компиляции:
too few template-parameter-lists
Ниже приведен абстрактный и упрощенный пример этого кода. Ошибка на отмеченной строке.
#include <iostream>
using namespace std;
template<class SomeType> class SomeTemplate
{
public:
SomeType msg;
void Func ();
};
void SomeTemplate<long>::Func () //--- Error Here ---
{
cout << "SomeType size: " << sizeof (msg) << endl;
}
int main ()
{
SomeTemplate<long> MyType;
MyType.Func ();
}
Написать
template <>
void SomeTemplate<long>::Func ()
{
cout << "SomeType size: " << sizeof (msg) << endl;
}
template<>
похоже, отсутствует.