http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60448
--- Comment #11 from Alisdair Meredith <public at alisdairm dot net> --- Created attachment 32298 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32298&action=edit Portable test of ADL on local type Agreed, not-a-bug. For completeness, I attach a final test case that does perform ADL on a local class to unambiguously find the right 'swap', properly using CRTP to inject the friend that is the strongest match. Thanks to David Rodriguez Ibeas for the exact syntax to make this example work. This example works correctly with both libstdc++ and libc++ - no bug. Can I withdraw/close the issue myself? (don't know gcc bug system for handling user-error)