|Re: [eigen] private copy ctors|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] private copy ctors
- From: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
- Date: Sat, 12 Dec 2009 21:33:51 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=lqDgQbem3rbKlBxMzcsdb5ovdpwYRlzEaevlOdFBKEk=; b=JehqxDOq56QyqOSG+sCZGX0yzYgIf7W5tbT5Hk99OvCr8Tw15KiW+gCpJfezPkS51f /GyLLnOBPLGMqt/s5vGImTDhHsQV9zweDK0/ej2NsdjwHXCVTFDxYYO8pxApuHqU1wbt EqCGkEvg3u/JMDP61/ZjlRWT12d/lDfLJBKC8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=vqqIVk0gawyVFkvLeFHmd9/fGZyCNwKpISOuaVmwueZc2JkJ2h5Kbx2uzqTTwcbty2 qwAe37iV0CofuKpOvh5V6kycyhW7aynZJezcB2t7mK3IY/tClCVfeisyV84H0KopACri 4PQx2lmsy08Q9rrMgCUjd3CCZXDK4PJm3+h+w=
I hope it were only assignment operators and no copy constructors.
I once observed an issue that MSVC is complaining that assignment operators could not be generated automatically (for some classes). It has also been reported by grinderfox over here.
Of course I ran all unit tests before comitting. The idea is that the assignment operators in question are not required - this is emphasized by not only making them private but also leaving out the implementation. Those small objects are internal only (no outside user should ever be required to work with them) and are never copied. They are just proxies or something like spring-boards to the real implementations ...
So, to be clear. It were many changes and I hope I did not by accident add any private assignment operator to public (for the outside world) classes, nor do I hope that I made copy constructors private (though even those are probably not required).
p.s. I just double checked - its only assignment operators.
On Sat, Dec 12, 2009 at 6:47 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
this is about Hauke's changeset c2937e22f0aa.
It adds private copy ctors a bit everywhere.
I would be interested in some rationalization for that:
- what warnings does it fix? (what were these warnings saying)
- why is it OK to have the copy ctors private? Doesnt it prevent one
from making copies?
I'm probably missing something obvious!!