Why does C++ allow nested namespace with same name? : <p>Codes bellowing compiles:</p>

<pre><code>namespace x
{
namespace y
{
    namespace x
    {
    struct C
    {
    C ()
    {
    std::cout &lt;&lt; "x::y::z::C" &lt;&lt; std::endl;
    }
    };
    }
}
struct C
{
    C ()
    {
    std::cout &lt;&lt; "x::C" &lt;&lt; std::endl;
    }
};
}
</code></pre>

<p><code>x::C</code> and <code>x::y::x::C</code> are not same, but it's sometimes confusing.</p>

<p>Why is <code>x::y::x</code> allowed in C++? Isn't it more clear to forbid this?</p>
