[Bug libstdc++/13542] the overload of < operator doesn't work for complex<double> when use stl sort

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Jan 2 05:07:00 GMT 2004


------- 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



More information about the Gcc-bugs mailing list