[C++-sig] Boost newbie help

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Mon Mar 22 15:48:05 CET 2004

I believe you just have to use boost::noncopyable.


To see many examples:

cd boost/libs/python/test
grep noncopyable *


--- brett hartshorn <bhartsho at yahoo.com> wrote:
> I'm having a problem wrapping a class that looks like this:
> class A {
>     A _myVar;
>     A (const A &);   //don't ask why this is not defined
>   public:
>     A() { _myVar = myFunction(); }
> }
> It will generate errors when building that say:
> error: `A::A(const A&)' is private
> /usr/include/boost/python/object/value_holder.hpp:111: error: within this
> context
> If i remove the strange constructor that does nothing, then it builds without
> any problems.
> Anybody have any ideas how to fix this, other than removing that constructor?

Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.

More information about the Cplusplus-sig mailing list