[C++-sig] Wrapping a class with a private copy ctor

François Duranleau duranlef at iro.umontreal.ca
Tue Sep 25 17:39:09 CEST 2007


On Tue, 25 Sep 2007, Matthew Scouten wrote:

> Right, so the class that I need to wrap has a private copy ctor.
[snip]
> BOOST_PYTHON_MODULE(core)
> {
> 	class_<CTTPriceConsumer_wrapper>("CTTPriceConsumer");
> }

Tell Boost.Python the class is not copyable:

BOOST_PYTHON_MODULE(core)
{
     class_<CTTPriceConsumer_wrapper,boost::noncopyable>("CTTPriceConsumer");
}                                   ^^^^^^^^^^^^^^^^^^

-- 
François Duranleau


More information about the Cplusplus-sig mailing list