[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


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


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


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

More information about the Gcc-bugs mailing list