i have a Controls
class that have default constructor and copy constructor and other constructor ,and an assignment operator , and i want to create array of my cla
I'm not sure that you are implementing your copy semantics correctly, and the use of std::auto_ptr
as a data member is kind of an "alert sign".
Are your Controls
really deep-copyable?
Maybe you should just use scoped_ptr
instead of auto_ptr
data members, ban copy declaring private copy constructor and private operator=
, and use vector
?
(Or use C++11 and move semantics, and so use unique_ptr
instead of auto_ptr
, and just use compiler automatically generated move operations?)