[C++-sig] copy.deepcopy of a vector, and the resulting error

Hans Meine meine at informatik.uni-hamburg.de
Fri Feb 8 10:23:24 CET 2008

Am Donnerstag, 07. Februar 2008 20:23:54 schrieb Matthew Scouten:
> Implementing an explicit __deepcopy__ for every class could be a lot of
> work , and I do not understand what that memo argument is doing.

You can use my implementation.

> I had hoped that BP would just know what to do. After all, all the classes
> in question have perfectly good copy ctors. I take it that
> 'class_<...>.enable_copy()' and the other ideas in that thread were never
> implemented?

Yes, I have sent code that contains the implementation (in that thread, 
2007-10-17 10:25), only:
1) The API is not class_<...>.enable_copy()
2) It was not integrated into the BPL (yet)

AFAICS, David agreed in principle that this would be good to have in 
boost::python, and he even suggested to have that by default for 
not-noncopyable classes.

If there is agreement on that, I will have a look at that in ca. 2 weeks; 
maybe I can propose a patch.

Ciao, /  /
    /  / ANS

More information about the Cplusplus-sig mailing list