I have two functions: one is scalar multiplication for vector and the other is vector-matrix multiplication:
pure T[] mul(S, T)(S s, T[] a)
and
pure T[] mul(T)(T[] a, T[][] B)
Of course, this leads to conflict, because S can be a vector, so the first pattern covers the second. How to tell the compiler, I want only the scalar type to be S ?
source share