R
Rafal Dabrowa
I try to write template class specialization.
I wrote the following code:
template<class T> class A {
public:
A();
};
template<> class A<char> {
public:
A();
};
template<> A<char>::A() {} // compilation error
GNU g++ compiler reports me the following error:
ts.cc:11: error: template-id `A<>' for `A<char>::A()' does not match any
template declaration
What I'm doing wrong ? How to define non-inline,
specialized class member function ?
Rafal
I wrote the following code:
template<class T> class A {
public:
A();
};
template<> class A<char> {
public:
A();
};
template<> A<char>::A() {} // compilation error
GNU g++ compiler reports me the following error:
ts.cc:11: error: template-id `A<>' for `A<char>::A()' does not match any
template declaration
What I'm doing wrong ? How to define non-inline,
specialized class member function ?
Rafal