Skip to content

Missing size parameters in fixed-size block method

Submitted by Marton Danoczy

Assigned to Nobody

Link to original bugzilla bug (#579)

Description

Created attachment 325
Patch to solve the issue

I need to make blocks of partly dynamic matrices, something along the line of the following:

template <int Rows>
void f(int rows)
{
Array<float, Rows, Dynamic> a(rows, 1234);
Array<float, Rows, 4> b;

a.block(0, 567, rows, 4) += b;  
a.block<Rows, 4>(0, 567, rows, 4) += b; // *** BREAKS!  

}

The second line doesn't compile, since the method block<R,C>(i,j) takes only two arguments, probably due to oversight. Fixing it is trivial, I have attached a patch.

Attachment 325, "Patch to solve the issue":
block_size.diff

Blocking

#387 (closed)

Edited by Eigen Bugzilla