Re: [eigen] Interesting C++ standard proposal |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
On 13.11.2013 12:31, Ilja Honkonen wrote:
auto a = A.block(...);
does the user want a copy of the submatrix or a lightweight view?
Actually, an even more trivial example would be this:
auto B = A; // is B a reference or a copy?
Isn't auto& always needed in order to get a reference to a C++ or STL
object? It would be surprising if eigen behaved differently.
Yes, you are right, let me take back that example. I did not say what A
is, though. If it was a Ref<> or a Map<>, the question remains --
calling .eval() on Ref<> does not change the return type (but that's
essentially the same as with the block example).
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
----------------------------------------------