[Bug libstdc++/15276] Erroneous Comparisons of Negative Characters

sebor at roguewave dot com gcc-bugzilla@gcc.gnu.org
Wed May 5 17:36:00 GMT 2004


------- Additional Comments From sebor at roguewave dot com  2004-05-05 17:36 -------
Subject: Re:  Erroneous Comparisons of Negative Characters

pcarlini at suse dot de wrote:

...
> But I also think that typedef-ed or not-typedef-ed ;) v3 basic_string
> lives in a world full of C strings, compared using strcmp and co (I'm
> particularly concerned by the two string::compare overloads comparing
> *this with a C string) and full of other respectable implementations
> that are all strictly speaking incorrect all in the very same way
> (that sketched by Josuttis, p.690, by the way)

Maybe it's lt() that needs to be fixed to behave like memcmp(), not
compare() to behave like lt(). AFAICS, the standard does not require
that lt() return the same value as operator<().

Martin




-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15276



More information about the Gcc-bugs mailing list