Re: [eigen] private copy ctors

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi Benoit,

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).

- 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> wrote:
Hi,

this is about Hauke's changeset c2937e22f0aa.
https://bitbucket.org/eigen/eigen/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!!

Benoit





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/