[C++-sig] Re: wrapping class X with private constructor X::X(const X&)

Mike Rovner mike at nospam.com
Thu Mar 4 22:36:36 CET 2004


Pearu Peterson wrote:
> Is it true that boost.python tries
> to use X::X(const X&) internally? Is is possible to avoid it?

Yes. Yes, use boost::noncopyable as in

class_<Klass, boost::noncopyable>("Klass", no_init) ...

HTH,
Mike







More information about the Cplusplus-sig mailing list