Re: [eigen] a few updates...

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


Hello and Merry Christmas!

On 23.12.2010 04:49, Benoit Jacob wrote:
> [...]
> 
> Pushed! But I really dont have time to write now.

I found a single tiny hole:

void foo(const Matrix3d &m){
	Block<Matrix3d,3,3,false, false> b(m,0,0);
	b.setZero();
}

Admittedly this example does not exactly use the API as intended.

Question is however: Does Block<T,rows,cols, InnerPanel,
HasDirectAccess> with HasDirectAccess==false need write access?
Otherwise the easiest fix would be to remove all write methods from the
unspecialized Block (thus avoiding every const_cast and therefore making
const correctness quite certain).
Other alternative is to static_assert that has_direct_access<T>::ret is
false if HasDirectAccess is false (or somehow hide the last template
parameter by another stage of inheritance).

Greetings
Christoph


-- 
----------------------------------------------
Dipl.-Inf. Christoph Hertzberg
Cartesium 0.051
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/