How does “using std::swap” enable Argument-Dependent Lookup (ADL)?
Just wanted to add why this idiom is used at all, which seemed like the spirit of the original question. This idiom is used within many std library classes where swap is implemented. From http://www.cplusplus.com/reference/algorithm/swap/: Many components of the standard library (within std) call swap in an unqualified manner to allow custom overloads for non-fundamental … Read more