Open
Description
This code example fails:
fn foo<V: VectorSpace<Field=f64>>(a: V, b: V, c: f64) -> V {
a * c + c * b
}
with this error:
error[E0277]: the trait bound `f64: std::ops::Mul<V>` is not satisfied
|
| a * c + c * b
| ^ no implementation for `f64 * V`
|
= help: the trait `std::ops::Mul<V>` is not implemented for `f64`
= help: consider adding a `where f64: std::ops::Mul<V>` bound
(omitted source location in my project for clarity)
Is there a reason, why this can't be made work? As multiplication on the field commutes anyway, the operator should generally be available in this way.
Metadata
Metadata
Assignees
Labels
No labels