[C++-sig] Re: abstract templates and pyste question.

Hanz Meizer steam at nurfuerspam.de
Wed Feb 18 16:08:34 CET 2004


While investigating, I found something strange:

I've got two classes, both are abstract, the base class is a regular 
class, the derived class is a template. The base has a private copy 
constructor (which is empty). The derived one has no copy constructor 
declared. The whole construct didn't pythonize, since pyste declares a 
wrapper for the derived class that calls the base copy constructor 
(which is private). Obviously (?), C++ avoids calling the private base 
copy constructor from the implicitly generated derived copy constructor 
(that's my explanation, maybe this is not true. Who knows?). Maybe this 
only holds true for templates. Anyways, I solved this special issue by 
inserting a private copy constructor (that is defined empty) in the 
derived template.

Is this a known thing? What if the include files were write only fo me 
and I couldn't modify them? After all, in C++ this kind of setup is 
working, just th generated wrapper seems to make false assumptions.


More information about the Cplusplus-sig mailing list