Skip to content

DenseMatrix: Allow assignment from anything that converts to field_type

The DenseMatrix class allows assignment from scalars. Anything would be accepted as a scalar for which IsNumber returns true. Unfortunately, this excludes FieldVector<.,1>, which in many other places is expected to play the role of a scalar.

This patch changes the assignment-from-a-scalar logic of DenseMatrix: Any type that is convertible to the field_type of the matrix is now accepted as a scalar. This should still hold for all previous cases, but includes FieldVector<.,1> as well.

Merge request reports