2 ms·
You can leave out the explicit return type. auto func = [] (std::complex<double> z, std::complex<double> c) { return z * z + c; }; You could also typedef th
by sbmassey 14y ago
You can leave out the explicit return type.
auto func = [] (std::complex<double> z, std::complex<double> c) { return z * z + c; };
You could also typedef the number type somewhere:
typedef std::complex<double> Complex;
// ...
auto func = [] (Complex z, Complex c) { return z * z + c; };
I think that last one looks ok.