https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113841
--- Comment #3 from Viktor Ostashevskyi <ostash at ostash dot kiev.ua> --- Additional information: everything works fine both for GCC12 and Clang if swap call is fully qualified, i.e.: std::swap(h1, h2);