Quote Originally Posted by Daved View Post
Note that if there is ambiguity in names because you are using a using directive, it will not necessarily be flagged as an error by the compiler. The compiler might just make the wrong choice and you won't know about it until your application works incorrectly or crashes (if you're lucky). Admittedly this will be rare, but I've seen a handful of problems on C++ forums that were the result of a using directive causing a name to be ambiguous. For contrived examples see this thread:

http://cboard.cprogramming.com/showthread.php?t=55269
The example in that thread is a practical problem, but has got nothing to do with ambiguity resulting from functions in multiple namespaces. It is a problem of function overloading, with the compiler being required (unambiguously) to call a particular function, but the programmer incorrectly expecting something else to be invoked (the count algorithm in the <algorithm> header, which is not #include'd so the compiler will never consider it as a candidate to be called in any circumstance). The undefined behaviour occurs because the count() function happens to fall off the end of an array because of the arguments it is passed.