I would like to solve the linear system Ax = b in a linear least squares fashion, thereby obtaining x. Matrices A, x and
Ax = b
x
A
Since std::complex is a template class, and you init with std::complex(1,1); the compiler doesn't know what type it is.
std::complex
std::complex(1,1);
Use std::complex<double>(1, 1); instead.
std::complex<double>(1, 1);