I am quite suprised that it's not possible to multiply two valarrays if one is of type double and second is int.
Why is that?
std::valarray<int> vali(3);
vali[0] = 0;
vali[1] = 1;
vali[2] = 2;
std::valarray<double> vald(3);
vald[0] = 0;
vald[1] = 1;
vald[2] = 2;
std::valarray<double> result(3);
result = vald * vali;
compiler error:
error C2678: binary '*' : no operator found which takes a left-hand operand of type 'std::valarray<double>'
It's same for both g++ and msvc++ compiler.