On Tue, 2004-08-31 at 08:54 +0100, Max Bowsher wrote: > > So we have code like that at the moment? > > Certainly. 4 occurrences in IniDBBuilderPackage.cc and 1 in package_db.cc.
Eh? I can't find any. We have things like setSourcePackage(PackageSpecification(name)); which at the end of the call chain does: _packageversion::setSourcePackageSpecification(PackageSpecification const &aSpec) { _sourcePackage=aSpec; } which should not invoke the copy contructor. rather it is the assignment operator. PackageSpecification &operator= (PackageSpecification const &); which is public, and should be usable. gcc 3.x have all honoured the privateness of Foo aFoo(Foo());, and whatever warning you are getting is probably correct. As to the privateness of the copy constructor, I didn't comment it, but neither did I implement it: thats an idiom I use, to cause compiler errors when someone tries to do something that they aren't meant to. You could certainly make it public and implement it if you choose. However, showing the error you get might be more useful... Rob
signature.asc
Description: This is a digitally signed message part