https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105241
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2022-04-12 Ever confirmed|0 |1 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Arthur O'Dwyer from comment #0) > Swapping elements via the std::swap two-step works for `std::vector<bool>`; Not according to the C++ standard it doesn't. That's https://wg21.link/lwg3638 > I see no reason it shouldn't also work for `std::bitset<N>`. I see no requirement in the standard for it to work. > libc++ and Microsoft STL both support `swap` on `bitset::reference` just > fine. That's a non-standard extension. I think we could add it to libstdc++, but this seems like an LWG issue to me.