Ahh. I've had a thought, but still need help.
I simplified my above example. What it really looks like is this:
Code:
bool somefunc(const std::complex<long double>& x, const std::complex<long double>& y,
std::complex<long double>& rslt)
{
...
rstl = muliply(x, y);
// rslt = x * y;
return true;
}
NOW, when calling it have been doing this:
Code:
std::complex y = 10.0L;
bool ok = somefunc(10.0L, y, y);
// Here I'm expecting y to 100.0L
Notice I have passed 'y' into a const input parameter, but I am also using it the same data to return the result.
Could this be my problem?