On 04/23/2017 09:33 PM, XavierAP wrote:
void assembleMass1D(Mat, Vec)(ref Mat M, const ref Vec x)
{ /* ... */ }
Matrix!(2,2) M = /* ... */;
Vector!2 V = /* ... */;
assembleMass1D(M, V); // ERROR template cannot deduce function from
argument types
Please post self-contained code. When I fill the gaps you left, it works
for me:
----
struct Matrix(uint a, uint b) {}
struct Vector(uint a) {}
void assembleMass1D(Mat, Vec)(ref Mat M, const ref Vec x)
{ /* ... */ }
void main()
{
Matrix!(2,2) M;
Vector!2 V;
assembleMass1D(M, V); /* no error */
}
----