2008/10/29 06:46:12.513 GMT-4

Boost.Python: ios_base bug workaround

Il bug, precedentemente segnalato, nell' implementazione della libreria ios_base, provoca dei problemi anche nell' utilizzo di Boost.Python:
se si cerca di creare una interfaccia Python per una classe che ha' come data member una instanza della classe ios_base (o di una sua sottoclasse), si ottiene un messaggio d' errore.

Si puo' risolvere il problema semplicemente usando il seguente metodo:
the error hints at a problem with the copy constructor. May be the
class_ template requires a copy constructor to be present, but you
don't provide one, and the default (compiler generated) may just
not work, for example because std::fstream is neither copyable nor
assignable
.

Ovvero basta definire nella classe c++ un copy constructor evitando, in tal modo, che il compilatore generi quello di default che causa il problema.

Posted by: swarzy.2008/10/29 06:46:12.513 GMT-4
Tags: boost-python python programmazione template-metaprogramming cpp boost stroustruppen | Permalink

Post a comment





The CAPTCHA image

Please enter the letters shown in the image in the following text box. Provided by Captchas.net