We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 30efc1c commit 1b4774fCopy full SHA for 1b4774f
cp-algo/util/complex.hpp
@@ -39,8 +39,8 @@ namespace cp_algo {
39
template<typename T> T abs(complex<T> x) {return x.abs();}
40
template<typename T> T& real(complex<T> &x) {return x.real();}
41
template<typename T> T& imag(complex<T> &x) {return x.imag();}
42
- template<typename T> T real(complex<T> x) {return x.real();}
43
- template<typename T> T imag(complex<T> x) {return x.imag();}
+ template<typename T> T real(complex<T> const& x) {return x.real();}
+ template<typename T> T imag(complex<T> const& x) {return x.imag();}
44
template<typename T> complex<T> polar(T r, T theta) {return complex<T>::polar(r, theta);}
45
}
46
#endif // CP_ALGO_UTIL_COMPLEX_HPP
0 commit comments