Function name conflict: ADL / function merging?

That’s not how it works in C++. In C++, each function would still live in its own namespace, and if you want to be explicit, you can call somepackage::foo without any C++ using statements, and without foo living in a global namespace. I think section 1.1 of this document by Herb Sutter explains it very well: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2103.pdf.