This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
(970929) c++ type matching bug?
- To: egcs-bugs at cygnus dot com
- Subject: (970929) c++ type matching bug?
- From: Mumit Khan <khan at xraylith dot wisc dot edu>
- Date: Wed, 01 Oct 1997 12:35:45 -0500
The following code does not work with 970929 (did with previous releases):
========
#include <complex>
void foo() {
complex<double> x(0, 0);
complex<double> y = 1.0 + x; // OK
complex<double> z = 1 + x; // line 6: <<<< 1 doesn't match double
}
========
% c++ -c cmplx.cc
cmplx.cc: In function `void foo()':
cmplx.cc:6: no match for `int + complex<double> &'
=======
Shouldn't the "z" assignment work?
Regards,
Mumit -- khan@xraylith.wisc.edu
http://www.xraylith.wisc.edu/~khan/