What are the pitfalls of ADL?
There is a huge problem with argument-dependent lookup. Consider, for example, the following utility: #include <iostream> namespace utility { template <typename T> void print(T x) { std::cout << x << std::endl; } template <typename T> void print_n(T x, unsigned n) { for (unsigned i = 0; i < n; ++i) print(x); } } It’s simple … Read more