Boost logo

Boost :

From: Craig Henderson (cdm.henderson_at_[hidden])
Date: 2002-11-18 06:14:23

I am deriving from boost::noncopyable to prevent copying of my objects. When
I compile in VC7 with /W4 (warning level 4), I get a warning C4511 - copy
constructor could not be generated

The documentation states that: "This warning can be caused by having a copy
constructor for the base class that is not accessible by the derived class".
As a result, I changed the copy ctor and assignment operator to be protected
rather than private to make them visible to the derived class, and all is

So, my questions are: Can this change be made in the boost source
boost/utility.hpp? What was the rationale for make these members private
rather than protected? Does making this change actually cause any other
problems that I am missing?

-- Craig

Boost list run by bdawes at, gregod at, cpdaniel at, john at