Constrain dot templates to exclude meaningless cases
This constraints the non-vector overload of Dune::dot(a,b)
to cases where the first argument is a number in the sense
of Dune::IsNumber
.
This helps to avoid ambiguity if one wants to implement both,
dot(a,b)
and a*b
manually for a custom type. Without this
patch, the availability of a*b
activates Dune::dot(a,b)
concurrently to the custom implementation.
This also constrains transpose<M>(...)
to classes that at
least provide M::row_type
.
Both are just partial fixes of a deeper problem, but a full fix requires a severe refactorization of the matrix/vector interface.
Edited by Carsten Gräser