https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113807
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> --- Hmm, yes, the code for bitset<N>::set() is actually similar to what we get for foo() in comment 5. The new version with memset does produce different (vectorized?) code though. For operator== the current code is quite branchy, and looks better with memcmp to me (but I don't really know what I'm talking about).