Erez D wrote:




    Try to have gen_c2 return a pointer to c2<int>. That may resolve
    the problem.

no, it doesnt.

i am sure that there is a solution to this.
Try to have gen_c2 return a pointer to c2<int>, and place the actual function body definition after the definition of c2.

If that fails, have gen_c2 return a pointer to c1<int>. As c1<int> is a public parent of c2<int>, it should amount to almost the same thing.

In any case, having a child function return a copy of a parent class is bad OO design.

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

Reply via email to