[Bug c++/13542] New: the overload of < operator doesn't work for complex<double> when use stl sort
tjiq at 21cn dot com
gcc-bugzilla@gcc.gnu.org
Fri Jan 2 04:37:00 GMT 2004
the code following doesn't compile:
typedef complex<double> Tp;
vector<Tp> vp;
int operator<(const Tp &a, const Tp &b)
{
return a.imag()<b.imag();
}
sort(vp.begin(),vp.end());
--
Summary: the overload of < operator doesn't work for
complex<double> when use stl sort
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tjiq at 21cn dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13542
More information about the Gcc-bugs
mailing list