Re: [setup] Why does PackageSpecificationhaveaprivatecopy-constructor? (Robert?)

2004-09-01 Thread Max Bowsher
Robert Collins wrote:
On Tue, 2004-08-31 at 23:42 +0100, Max Bowsher wrote:
Unless we add explicit copy-constructors to every single class, I'd 
rather
just leave it out and let the compiler handle things implicitly? It seems
cleaner to me.
I think you'll find every class that has a destructor also has an
explicit copy constructor  assignment operator. That class certainly
has an explicit assignment operator... being explicit on the copy
constructor is consistent.
Have you heard of the 'rule of 3' ?
No. Apparently I need to do some reading.
Max.


Re: [setup] Why does PackageSpecificationhaveaprivatecopy-constructor? (Robert?)

2004-09-01 Thread Robert Collins
On Wed, 2004-09-01 at 08:12 +0100, Max Bowsher wrote:
 Robert Collins wrote:

  Have you heard of the 'rule of 3' ?
 
 No. Apparently I need to do some reading.

http://www.parashift.com/c++-faq-lite/coding-standards.html#faq-27.9

A class with any of {destructor, assignment operator, copy constructor}
generally needs all 3

Cheers,
Rob


signature.asc
Description: This is a digitally signed message part