Re: [eigen] still the solve() API debate

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


On Fri, Sep 11, 2009 at 3:36 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
>> Ok, I just caught up with re-reading... that's indeed ugly. But as you
>> guys already observed, in new compiler versions we already have rvalue
>> references. Benoit, what about your idea of passing Matrices by
>> reference and MatrixBase by value? You suggested to do that in the
>> "MatrixBase::swap - why const" thread? This approach would allow an
>> easy transition towards rvalues references in the future.
>
> That would be perfect, if you figure it out.

Great, now I am confused again - just while thinking about it. :)

Why not simply define swap as

template <typename OtherDerived>
void swap(MatrixBase<OtherDerived> m);

I mean in any case. It does not really matter whether a matrix is
passed or not - what we will copy is always only MatrixBase and that's
tiny, right?

Hauke



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