I am getting a compile error, saying that the copy constructor of the scoped_ptr is private with the following code snippet:
class a {};
struct s
{
boost::scoped_ptr<a> p;
};
BOOST_PYTHON_MODULE( module )
{
class_<s>( "s" );
}
This example works with a shared_ptr though. It would be nice, if anyone knows the answer. Thanks
The semantics of
boost::scoped_ptrprohibit taking copies, whileshared_ptris intended to be copied. The error you are getting is the compiler telling you that some of the code (macro expansion?) is trying to copy thescoped_ptrbut that the library does not allow the copy to be made.