Obviously this is another reason that "using namespace <something>;" is bad, but someone I showed this to told me it never actually happens in real code that you have something with the same name as the thing it is inside of (besides constructors/destructors).
They even ignored me when I said a namespace may have a class in it that has the same name, which (I thought) happens quite often in programming. Who do you think is right?
I don't think it's too much of a a stretch: one of the classes I'm using a lot is named the same way as the (4th-level nested) namespace it's in, except for a minor capitalization difference. And yes, the naming scheme actually makes sense (and no, I wasn't the person who named it). I don't think it's "quite often" though.
"I showed this to told me it never actually happens in real code that you have something with the same name as the thing it is inside of (besides constructors/destructors)."
...but you've shown him/her an example of it. Real-world code is no different than code that one has written for their personal use. If I wrote an array wrapper for a project at work, it would functional exactly the same if I used it in a personal project.
The fact is, it will only happen if the program/library is poorly structured or if the naming convention is appalling. Programmers who use "using namespace ..." excessively are likely to trigger such ambiguities.