This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/13542] the overload of < operator doesn't work for complex<double> when use stl sort
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Jan 2004 05:07:08 -0000
- Subject: [Bug libstdc++/13542] the overload of < operator doesn't work for complex<double> when use stl sort
- References: <20040102043754.13542.tjiq@21cn.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-02 05:07 -------
Your op< is in the global namespace, but at the place where
it is used (inside std::sort), only
operators in namespace std are looked up because both operands
are in namespace std. There are several other instances
of this bug/feature in the database.
You can work around the problem by putting the op< into
namespace std.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Component|c++ |libstdc++
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13542