[C++-sig] boost.python: private copy constructor problem

Stefan Seefeld seefeld at sympatico.ca
Tue Dec 2 15:19:03 CET 2008


Mihail Konstantinov wrote:
>
> gcc.compile.c++ bin/gcc-4.1.2/debug/boost.o
> boost.cpp: In copy constructor ‘B::B(const B&)’:
>   

As this error message suggests: as B derives from A, it is (by default) 
non-copyable, too. That you have to tell python, too, thus:

class_<A, noncopyable> a("A", init<>);
class_<A, bases<A>, noncopyable> b("B", init<>);
...

HTH,
       Stefan
 

-- 

      ...ich hab' noch einen Koffer in Berlin...



More information about the Cplusplus-sig mailing list