[Bug libstdc++/20758] operator-(const T&, const complex<T>&) vs operator-(const complex<T>&, const complex<T>&)

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Apr 4 21:45:00 GMT 2005


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-04-04 21:45 -------
Neither of the patches are correct.
The correct way is:
complex<T>(lhs) -= rhs;

Note this has to be done for operator - (const complex<T> &lhs, const T &rhs) also.
Should be done for all three "operator -" as 26.2.6 (in the C++ standard) demands that.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20758



More information about the Gcc-bugs mailing list