Start with a header that declares a namespace MySubsystem and a class Fred in that namespace. For example, the following might be in file MySubsystem.hpp: #ifndef MY_SUBSYSTEM_HPP #define MY_SUBSYSTEM_HPP namespace MySubsystem { class Fred { }; } #endif Now suppose some user code creates a normal function f() that takes a parameter of type MySubsystem::Fred: #include "MySubsystem.hpp" void f(MySubsystem::Fred& x) throw(); int main() { MySubsystem::Fred x; f(x); // Uses the global f() that takes // MySubsystem::Fred& as a parameter } Now suppose a revision of MySubsystem.hpp adds a function f(Fred& x) to namespace MySubsystem: #ifndef MY_SUBSYSTEM_HPP #define MY_SUBSYSTEM_HPP // This is a revision of the original header namespace MySubsystem { class Fred { }; void f(Fred& x) throw(); } #endif Suddenly, there is ambiguity as to which f(x) is needed, and the code will not compile. There are even more exotic examples, but the main point is that there are several ways ambiguity can creep in, and the programmer has to resolve the conflicts manually. This is not a severe problem because the compiler flags it and it is relatively easy to fix. |