[Bug libstdc++/101482] operator== for basic_string and __versa_string should check sizes first

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jun 16 19:20:48 GMT 2022


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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:

https://gcc.gnu.org/g:51309d1158b85560a975819260776c0ca68fd142

commit r13-1138-g51309d1158b85560a975819260776c0ca68fd142
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Jun 16 11:02:11 2022 +0100

    libstdc++: Apply r13-1096-g6abe341558abec change to vstring too [PR101482]

    As recently done for std::basic_string, __gnu_cxx::__versa_string
    equality comparisons can check lengths first for any character type and
    traits type, not only for std::char_traits<char>.

    libstdc++-v3/ChangeLog:

            PR libstdc++/101482
            * include/ext/vstring.h (operator==): Always check lengths
            before comparing.


More information about the Gcc-bugs mailing list