[Bug libstdc++/62187] std::string==const char* could compare sizes first

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jan 24 15:05:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62187

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Ah yes, of course. So we can move that traits::length into the operator== and
then call the compare(size_type, size_type, const CharT*) overload instead.

I'll take care of this in Stage 1.


More information about the Gcc-bugs mailing list