|Re: [eigen] private copy ctors|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] private copy ctors
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Sat, 12 Dec 2009 17:20:34 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=7DKvGL/mNqeO1aN0Sk42h2d8Q4ywhsAuDaS9B41TnMI=; b=skX9812tNn2aY2LZgJv153gFx5kUEIOE2sG1FTNhC62H7ll4j6Z7IIAhfcONzejxJ2 AakJCa0DdrU38VgdJGxcYq0Ew6DfDQUBlEP8PphpgkSKWsL1qHkU2tk1kx1dmi7QAqhC Rn5aJMlC6HK7aXVCFMLR5QtQRXbMOekyBl23A=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=SeHJG1L8XDtnbSXPqSn65HpdTak3nswMS26+d8VqMLEeVSWRzWf70Spc5tBPVy6qp4 2rxt/o+kZa07E09jIeaSZmUihmOiZ+z7x41vW0lou+oeJy7zO6R+cQpi8NnGqnd6Q8n1 WDYAdbl/mFIDDQWNPTNaLYeGQquMvruU1t4Zc=
OK thanks for the reply and sorry, indeed it is assignment operators
and not copy ctors.
I didn't realize that you only did that in internal classes. Looking
back at it, it's true. Some classes a a bit on the border: for
example, it's not fully clear to me that SelfAdjointView is only
internal and that nobody would want to use its assignment operator.
It's not a big deal however, since there still is the copy ctor.
2009/12/12 Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>:
> 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).
> - Hauke
> 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!!