https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67796
--- Comment #2 from rkirchge at gmail dot com --- Thank you for the quick reply. Defining the swap overload in std does violate the standard, but it is the shortest example that reproduces the behavior I am seeing. In my code, I have defined a wrapper around std::tuple, and defined my own swap and get function in the associated namespace. I am trying to get std::sort to call my swap function to allow me to swap values stored in tuples of references. In clang my code works. In gcc if I do not include my swap(...) definition the compiler returns an error, but if I do include it it gives no error but uses some default std::swap implementation which does not work with tuples of references. My overload of get(...) is called correctly in gcc, but swap(...) is not. It will take me some time to cleanup my code, but I will post the example as requested as soon as possible.