> ADL is used whenever you write
std::string s;
auto t = s + s; // ADL on operator+
std::cout << s; // ADL on operator<<
swap(s, s); // ADL on swap
In particular, the "std::swap two-step" is used inside all swap-based STL algorithms, such as std::rotate and std::sort.
So you can't actually turn it off, because then you'd break the world (because approximately every C++ program depends on ADL somewhere). But you could issue a warning about it outside of system headers, just to get a sense of the magnitude of the issue.
> –Arthur
Perhaps this is why I have written "not-a-minority not using std lib" :) ... you know those pesky C++ projects using -fno-exceptions or even using things like EASTL (gasp! again). I am not a "just-say-no-to-adl" zealot, I am just developing your very same idea further. Let's see where that takes us. Perhaps that might lead to some solution about removing the heavy technical debt of ADL.
Enough said, peace
DBJ