Re: [eigen] Interesting C++ standard proposal

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


On 12.11.2013 13:25, Gael Guennebaud wrote:
a few examples to illustrate what I meant by "guessing":


auto a = A.block(...);

does the user want a copy of the submatrix or a lightweight view?

Yes, that is one of the important ambiguities. Especially, since this not only influences performance, but also what happens if A is changed after this assignment. (I've had my share of trouble with opencv's memory sharing ...)

Actually, an even more trivial example would be this:
  auto B = A;  // is B a reference or a copy?

But for the foreseeable future this discussion is mostly hypothetical, anyways -- at least regarding Eigen.
We could/should however make some C++11 related FAQ entries.

Christoph


--
----------------------------------------------
Dipl.-Inf., Dipl.-Math. Christoph Hertzberg
Cartesium 0.049
Universität Bremen
Enrique-Schmidt-Straße 5
28359 Bremen

Tel: +49 (421) 218-64252
----------------------------------------------



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