Erez D wrote:
c2<int> gen_c2(int a)
{
c2<int> ret(a);
return ret;
}
It would seem to me that this line instantiates c2<int>, so that
template <> class c2<int> : public c1<int>
{
public:
c2(int &a):c1(a) {};
};
is an attempt to specialized a class that has already been instantiated
from the generic template. The compiler has no way to go back and change
the storage size for c2<int>, which it already needed to know when
compiling the lines above.
Try to have gen_c2 return a pointer to c2<int>. That may resolve the
problem.
Shachar
--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com
_______________________________________________
Linux-il mailing list
[email protected]
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il