Boost logo

Boost Users :

From: Dale McCoy (dalestan_at_[hidden])
Date: 2006-05-17 21:23:46


> A class has static method to create and a static method to destroy. And the
> constructors and destructor of the class is marked as private. How do I
> expose such a class in Python?
> <snip code>

In the code you posted, the default constructor is indeed private, but
the copy constructor is not. Was that intentional? If so, then it's
still possible to write A otherA(A::create()); which requires public
access to ~A() in order to destroy otherA. If it was not intentional,
does explicitly privitizing the copy-constructor work? (Or make it
clear where Boost::Python wants to copy-construct an A?)

Dale


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net