https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101485
--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:fab60eaa94b50b1eea84f0d001004c851d4c781b commit r15-1715-gfab60eaa94b50b1eea84f0d001004c851d4c781b Author: Jonathan Wakely <jwak...@redhat.com> Date: Fri Jun 28 11:14:39 2024 +0100 libstdc++: Extend std::equal memcmp optimization to std::byte [PR101485] We optimize std::equal to memcmp for integers and pointers, which means that std::byte comparisons generate bigger code than char comparisons. We can't use memcmp for arbitrary enum types, because they could have an overloaded operator== that has custom semantics, but we know that std::byte doesn't do that. libstdc++-v3/ChangeLog: PR libstdc++/101485 * include/bits/stl_algobase.h (__equal_aux1): Check for std::byte as well. * testsuite/25_algorithms/equal/101485.cc: New test.