[C++-sig] boost.python: private copy constructor problem
Mihail Konstantinov
kmihail at rocketmail.com
Tue Dec 2 14:33:14 CET 2008
Hello,
I am still in the early process of learning boost.python.
I have reduced my problem to the following code:
#include <boost/python.hpp>
using namespace boost::python;
class A{
private:
A(const A&){}; //no public copy constructor
};
class B: public A{
public:
B(){};
};
BOOST_PYTHON_MODULE(boost_ext)
{
class_<A>("A",init<>());
class_<B, bases<A> >("B",init<>());
}
When running bjam on this example, I get
"boost.cpp:6: error: ‘A::A(const A&)’ is private"
as the first error among a long list of hints from the compiler.
How can I expose the classes with their constructors to python?
Thank you
Mihail
More information about the Cplusplus-sig
mailing list