26 Nov
2004
26 Nov
'04
12:21 a.m.
On Thu, 25 Nov 2004, MenTaLguY wrote:
Rule of thumb with C++: if it's not a value class [a class in which binary copies of objects are interchangable], give it a private copy constructor like so:
class Foo { public: Foo(); ... private: Foo(Foo const &); // no copy };
It's also good to privatize operator = for similar reason. (see Meyers)
Bryce