This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

... where cfront would use ...


Hi,

how can I get rid of the following warning:

==========%<=============
#include <vector>
#include <complex>

typedef std::complex<double> mycomplex;

int main() {

std::vector<mycomplex> a(1);
a[0] = mycomplex(2.,0.); // Here's the warning

return(0);
}
==========%<=============

g++ -W -Wall -Wsynth example.cc

example.cc: In function `int main()':
example.cc:10: warning: using synthesized
`std::complex<double>& std::complex<double>::operator=(const
std::complex<double>&)' for copy assignment
gcc/i686-pc-linux-gnu/3.4.1/../../../../include/c++/3.4.1/complex:998:
warning: where cfront would use
`std::complex<double>& std::complex<double>::operator=(const
std::complex<_Tp>&) [with _Tp = double]'






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]